toArray

toArray() -> Array

Returns an Array representation of the enumeration. Aliased as entries.

Note: this makes any object that mixes in Enumerable amenable to the $A utility function.

Examples


$R(1, 5).toArray()
// -> [1, 2, 3, 4, 5]

Performance considerations

Obviously, objects that mix in Enumerable may override the default code, as Array does.