instance method Array#size

View source on GitHub →

Array#size() → Number

Returns the size of the array (e.g., array.length).

This is just a local optimization of the mixed-in Enumerable#size which avoids array cloning and uses the array's native length property.