use the ... operator, which is the same thing except that the final item in the range is omitted : Range Creation « Range « Ruby
- Ruby
- Range
- Range Creation
use the ... operator, which is the same thing except that the final item in the range is omitted
my_new_range = 1...4
puts my_new_range
Related examples in the same category