Mega Code Archive
Categories
/
Ruby
/
Range
Get first two from a range
p (1..5).first(2) # => [1,2]