concat(p1)
public
Appends the elements of other_ary to self.
[ "a", "b" ].concat( ["c", "d"] )
a = [ 1, 2, 3 ]
a.concat( [ 4, 5 ] )
a
See also Array#+.
VALUE
rb_ary_concat(VALUE x, VALUE y)
{
rb_ary_modify_check(x);
y = to_ary(y);
if (RARRAY_LEN(y) > 0) {
rb_ary_splice(x, RARRAY_LEN(x), 0, y);
}
return x;
}