Use Fixnum#times Rather than for i in 1..10 puts "My iteration #{i}" end Use 10.times do |i| puts "My iteration #{i + 1}" end