From: Tanaka Akira Date: 2011-09-17T16:09:28+09:00 Subject: [ruby-core:39605] Re: [Ruby 1.9 - Bug #4576] Range#step miss the last value, if end-exclusive and has float number 2011/9/17 Yusuke ENDOH : > Maybe this "consideration" causes the following behavior: > > p (1.0..12.7).step(1.3).all? {|n| n <= 12.7 } #=> false > p (1.0..12.7).step(1.3).to_a > #=> [1.0, 2.3, 3.6, 4.9, 6.2, 7.5, 8.8, 10.1, 11.4, 12.700000000000001] > > Is this ok? > I guess the result length will vary if this is fixed simply. I agree. I can't remember a discussion about it. However I can't remember a bug report about it around Ruby 1.8 era. -- Tanaka Akira