On Nov 10, 2008, at 12:21 am, Greg Hauptmann wrote:

Ashley - what's you're recommendation re using BigDecimal (which does
work as you point out) and the Money gem (which it sounds like makes a
dev's life a bit easier)???  Is it worth trying to port an application
from use of BigDecimal to Money gem???


Hi Greg

I'd use the money gem if and only if it's underlying implementation is BigDecimal or some other fixed-precision system. I've had a look over it and it appears to use integers to store values as small as 1/100 of the base unit. So as long as you don't need to use anything smaller than that in calculations (ie, you only add, and never multiply, values - eg for tax calculations) it will be fine.

I'll try not to say too much more, we're straying well away from RSpec territory...

Ashley

--
http://www.patchspace.co.uk/
http://aviewfromafar.net/

_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to