I'm using Rails 2.2.2 and I'm having the same problem here.

>> d=BigDecimal('10',2)
=> #<BigDecimal:24647c0,'0.1E2',4(8)>

>> (d/3).to_s
=> "3.333333333333333333333333"

>> (d/3).to_f.round_with_precision(2)
=> 3.33

Do I have to convert always the BigDecimals to float in every math 
operation and then use the round_with_precision ?

This has been solved in the 2.3 ?

patching the Rails is an option but ...

Any better ideas on how to accomplish that ?


thanks .....

r.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to