You can easily do something to each element in a range.
(1..5).each do |i| print i end # 12345