(5..7).each {|x| print x } # Prints "567" (5..7).each_with_index {|x,i| print x,i } # Prints "506172"