Array changes¶
Array#==¶
Now honors custom to_ary methods for RHS objects.
Array#[]¶
Now raises an ArgumentError if you specify a negative length for the second form.
Array#collect¶
Redundant implementation removed. It now uses the mixed-in Enumerable#collect method.
Array#fetch¶
Removed, useless.
Note that removing this method required an update to optparse.rb.
Array#fill¶
- No longer accepts a block.
- Raises an ArgumentError if you provide a negative length.
- Raises an IndexError if you specify a starting index greater than the length of the array.
Array#indexes¶
Removed, deprecated.
Array#indices¶
Removed, deprecated.
Array#insert¶
Providing an index with no other arguments now raises an ArgumentError.
Array#push¶
Now requires at least one argument or an ArgumentError is raised.
Array#slice¶
Now a bonafide alias of Array#[] instead of a synonym.
Array#to_s¶
Uses the same code as Array#inspect. They are now aliases.
Array#transpose¶
Removed. This is a rarely used method that was added primarily for vectors and matrices. The Matrix and Vector classes implement it independently, so I decided to remove it.
Array#zip¶
Redundant implementation removed. It now uses the mixed-in Enumerable#zip method.