lib/pagseguro/order.rb in pagseguro-0.1.5 vs lib/pagseguro/order.rb in pagseguro-0.1.6
- old
+ new
@@ -64,10 +64,10 @@
self << options
end
private
def convert_unit(number, unit)
- number = (number * unit).to_i unless number.nil? || number.kind_of?(Integer)
+ number = (BigDecimal("#{number}") * unit).to_i unless number.nil? || number.kind_of?(Integer)
number
end
end
end