Ruby Method of the Day - Array.+
Signature
array + other_array #=> new_array
array + other_array returns new_array that contains the
concatenation of array and other_array.
Examples
1 2 |
[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
