From: Charles Oliver Nutter Date: 2009-02-15T18:25:26+09:00 Subject: [ruby-core:22136] Confused about some code in mathn.rb In 1.8.6 and 1.8.7, these lines appear at line 202 in mathn.rb: loop do if (neard**other.denominator == self.denominator) dem = neaed break end end I'm confused about the purpose of this code. If the equality check fails, it will simply loop forever. If the equality check passes, it will end after a single loop. So what's the purpose of the loop? Perhaps it never happens in MRI but for a particular spec running under JRuby it ends up comparing 3.999999999999999 with 4.0. I'm looking into whether we can tweak the power computation in JRuby to produce the 4.0 result, but it's still rather confusing what the code above is intended to do. Anyone? - Charlie