2006-02-17 times RubyのtimesはIntegerのメソッドです。Floatを与えるとエラーになります。 5.times do |i| print "#{i}, " #=> 0, 1, 2, 3, 4, end (5.0).times do |i| #=> undefined method `times' for 5.0:Float (NoMethodError) print "#{i}, " end