This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Array.insert (from ruby core) --- array.insert(index, *objects) -> self --- Inserts given `objects` before or after the element at Integer index `offset`; returns `self`. When `index` is non-negative, inserts all given `objects` before the element at offset `index`: a = [:foo, 'bar', 2] a.insert(1, :bat, :bam) # => [:foo, :bat, :bam, "bar", 2] Extends the array if `index` is beyond the array (`index >= self.size`): a = [:foo, 'bar', 2] a.insert(5, :bat, :bam) a # => [:foo, "bar", 2, nil, nil, :bat, :bam] Does nothing if no objects given: a = [:foo, 'bar', 2] a.insert(1) a.insert(50) a.insert(-50) a # => [:foo, "bar", 2] When `index` is negative, inserts all given `objects` *after* the element at offset `index+self.size`: a = [:foo, 'bar', 2] a.insert(-2, :bat, :bam) a # => [:foo, "bar", :bat, :bam, 2]
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.