34,333
edits
Changes
→Ruby Array Comparisons
The eql? method is similar to the == method with the exception that the values in corresponding elements are of the same value type.
Finally, the <=> method (also known as the "spaceship" method) compares two arrays and returns 0 if the arrays are equal, -1 one if the elements are less than those in the other array, and 1 if they are greater.
== Modifying Arrays ==