Use Fixnum#times Rather than for i in 1..10 puts 'My iteration' end Use 5.times do puts 'My iteration' end