lib/latinum/formatters.rb in latinum-1.2.0 vs lib/latinum/formatters.rb in latinum-1.3.0
- old
+ new
@@ -62,10 +62,10 @@
amount = amount.round(@places)
fix, frac = amount.abs.to_s('F').split(/\./, 2)
# The sign of the number
- sign = amount.sign < 0 ? '-' : ''
+ sign = '-' if amount.negative?
# Decimal places, e.g. the '.00' in '$10.00'
frac = frac[0...@places].ljust(@places, @zero)
# Grouping, e.g. the ',' in '$10,000.00'