This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

push

        # Array.push

(from ruby core)
---
    array.push(*objects) -> self

---

Appends trailing elements.

Appends each argument in `objects` to `self`;  returns `self`:
    a = [:foo, 'bar', 2]
    a.push(:baz, :bat) # => [:foo, "bar", 2, :baz, :bat]

Appends each argument as one element, even if it is another Array:
    a = [:foo, 'bar', 2]
    a1 = a.push([:baz, :bat], [:bam, :bad])
    a1 # => [:foo, "bar", 2, [:baz, :bat], [:bam, :bad]]

Array#append is an alias for Array#push.

Related: #pop, #shift, #unshift.



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.