Skip to content
instance method

Array#+

[U] (::_ToAry[U]) -> ::Array[Elem | U]
self + other_array → new_array

Returns a new array containing all elements of self followed by all elements of other_array:

Example
a = [0, 1] + [2, 3]
a # => [0, 1, 2, 3]

Related: see Methods for Combining.

See also #* #- #& #<< also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0