Skip to main content
Say What???
Ain't got a slogan...

Main menu

  • Home
  • Archived Articles

You are here

Home » Ruby 1.8 Method of the Day Archive

Array.+

Kelly McCauley's picture
published by Kelly McCauley on Wed, 10/27/2010 - 19:26

Signature

array + other_array   #=> new_array

array + other_array returns new_array that contains the
concatenation of array and other_array.

Examples

[1,2,3,4,5] + [5,6,7,8,9]   #=> [1, 2, 3, 4, 5, 5, 6, 7, 8, 9]
[5,6,7,8,9] + [1,2,3,4,5]   #=> [5, 6, 7, 8, 9, 1, 2, 3, 4, 5]

Documentation Reference

Ruby version 1.8.6

www.ruby-doc.org : Array.+

‹ Array.& up Array.- ›
  • Log in to post comments

Ruby 1.8 Method of the Day Archive

  • Array.&
  • Array.+
  • Array.-
  • Array.<< and Array.push
  • Array.[] and Array.slice
  • Array.[]=
  • Array.abbrev
  • Array.assoc
  • Array.compact and Array.compact!
  • Array.delete
  • Array.delete_if
  • Array.fetch
  • Array.first
  • Array.last
  • Array.map and Array.collect
  • Array.map! and Array.collect!
  • Array.nitems
  • Array.pop
  • Array.rassoc
  • Array.reject
  • Array.reject!
  • Array.slice!
  • Float.ceil
  • Float.floor
  • Float.truncate
  • Integer.downto
  • Integer.times
  • Integer.upto
  • String.%
  • String.*
  • String.+
  • String.<=>
  • String.==
  • String.=~
  • String.[]
  • String.[]=
  • String.casecmp
  • String.center
  • String.count
  • String.delete
  • String.delete!
  • String.gsub
  • String.gsub!
  • String.hex
  • String.index
  • String.insert
  • String.inspect
  • String.length
  • String.ljust
  • String.lstrip
  • String.lstrip!
  • String.next
  • String.reverse
  • String.rindex
  • String.rjust
  • String.rstrip
  • String.rstrip!
  • String.scan
  • String.strip
  • String.strip!
  • String.sub
  • String.to_sym

User login

  • Request new password

Syndicate

Subscribe to Syndicate

Content Copyright © Kelly McCauley, All Rights Reserved. Trademarks and copyrights are owned by their respective owners. Comments are owned by the commenter.