From: Michael Ulm Date: 2007-09-06T20:07:58+09:00 Subject: Re: 0.06 == 0.06 returns false in Ruby? Pe�a wrote: > From: Michael Ulm [mailto:michael.ulm@isis-papyrus.com] > # > x = 1.0.to_dec / 3.0.to_dec > # > y = x + x + x > # > y == 1.0.to_dec # => false > > hmm, i thought this was already answered by others.. gotta check.. > > irb(main):023:0* x=1.0.to_dec/3.0.to_dec > => # > irb(main):024:0> x+x+x == 1.0.to_dec > => true Strange, I tested this on two different machines and both gave false to your last expression. Did you modify BigDecimal#== ? Regards, Michael