Convert range to array or entries : entries « Range « Ruby






Convert range to array or entries


(1..3).to_a       # => [1,2,3]
(1..3).entries    # => [1,2,3]

 

Related examples in the same category