Finds item at the given index and returns nil if the index does not exist in the array.
2 . append()
Appends items to the end of the array.
3 . assoc()
Searches for an array within another array. The argument is compared with first
item of the inner array, and that array is returned if that first item matches the argument. Further matches are ignored.
NB: Works only for two dimensional arrays
4 . all?
With no block given and no argument, returns true if self contains only
truthy elements, false otherwise.
5 . any?
With no block given and no argument, returns true if self has any truthy
element, false otherwise.
6 . abbrev
Calculates the set of unambiguous abbreviations for the strings.
7 . bsearch_index
Finds the index of the array value that meets the given condition.
Returns a new Enumerator if no block given.
8 . bsearch
Returns an element selected by a binary search.
Returns a new Enumerator if no block given.
9 . collect
Returns a new array, built from the output of the block. This allows performing
operations on values in the original array, and storing the output of that.
10 . compact
Removes all nil elements from an array.
11 . count
Returns a count of specified elements. With no argument and no block, returns
the count of all elements.
12 . combination
When called with a block yields a two-dimensional array consisting of all
sequences of a collection of numbers. Unlike permutation, order is disregarded
in combinations. For instance, [1,2,3] is the same as [3,2,1].
13 . cycle()
Calls the given block n times for each item in the array.
Returns nil if the loop has finished without getting interrupted.
14 . clear
Removes all elements from array.
15 . concat()
Adds to array all elements from each Array in other_arrays.
16 . chunk
Enumerates over the items, chunking them together based on the return value of the block.
Consecutive elements which return the same block value are chunked together.
If the block value is the same but the elements are not consecutive, then a new group is created.
17 . chunk_while
Returns elements organized into chunks as specified by the given block.
18 . chain
Adds to array all elements from each Array in other_arrays.
19 . collect_concat
Returns a new array with the concatenated results of running block once for
every element in enum. If no block is given, an enumerator is returned instead.
20 . class
Returns the class of obj.
21 . clone
Produces a shallow copy of object. The instance variables of object are copied,
but not the objects they reference. #clone copies the frozen value state of obj,
unless the :freeze keyword argument is given with a false or true value.