I am trying to fill an array with dimensions that are measured by integers and half numbers (i.e. 10, 10.5, 11, 11.5, 12). So far I:
(10..12).map{ |size| [size, size + 0.5] }.flatten[0...-1]
Is there a more eloquent way to do this in Ruby without having to smooth and remove the last element?
ruby
Stussa
source share