From: Jano Svitok Date: 2007-09-27T22:46:54+09:00 Subject: Re: Bug in BigDecimal#round ? On 9/27/07, Ryan Platte wrote: > On Sep 27, 6:25 am, "Jano Svitok" wrote: > > > It seems to me as a bug. The code in trunk is the same, so I guess > > > it's not fixed yet. > > > > reported as #14271 > > Thank you very much for reporting the bug. I guess you can workaround the bug until it gets properly fixed - by opening the BigDecimal class. Last night I could not come with anything reasonable though ;-) class BigDecimal alias_method :old_round, :round def round(*args) if XXX self.class.new(YYY) else old_round(*args) end end end the problematic parts are XXX and YYY... ;-) args[0] and self.exponent might be usable... I haven't found any unit tests for BigDecimal, so if you create some, please post them somewhere (I'm not sure where - possible choises are: ruby tracker, http://rubyforge.org/projects/bfts/ tracker, ruby-core mailing list) Jano