diff options
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/number_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/number_helper.rb b/activesupport/lib/active_support/number_helper.rb index 8f5309c824..981ab0cb36 100644 --- a/activesupport/lib/active_support/number_helper.rb +++ b/activesupport/lib/active_support/number_helper.rb @@ -111,7 +111,7 @@ module ActiveSupport unit = options.delete(:unit) format = options.delete(:format) - if number.to_f < 0 + if number.to_f.phase != 0 format = options.delete(:negative_format) number = number.respond_to?("abs") ? number.abs : number.sub(/^-/, '') end |