push(...)
public
Append—Pushes the given object(s) on to the end of this array. This
expression returns the array itself, so several appends may be chained
together.
a = [ "a", "b", "c" ]
a.push("d", "e", "f")
Show source
/*
* call-seq:
* array.push(obj, ... ) -> array
*
* Append---Pushes the given object(s) on to the end of this array. This
* expression returns the array itself, so several appends
* may be chained together.
*
* a = [ "a", "b", "c" ]
* a.push("d", "e", "f")
* #=> ["a", "b", "c", "d", "e", "f"]
*/
static VALUE
rb_ary_push_m(argc, argv, ary)
int argc;
VALUE *argv;
VALUE ary;
{
while (argc--) {
rb_ary_push(ary, *argv++);
}
return ary;
}