diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/numeric/conversions.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/numeric/conversions.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb index 6586a351f8..cebfda8d31 100644 --- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb +++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb @@ -1,9 +1,8 @@ -require 'active_support/core_ext/big_decimal/conversions' -require 'active_support/number_helper' -require 'active_support/core_ext/module/deprecation' +require "active_support/core_ext/big_decimal/conversions" +require "active_support/number_helper" +require "active_support/core_ext/module/deprecation" module ActiveSupport::NumericWithFormat - # Provides options for converting numbers into formatted strings. # Options are provided for phone numbers, currency, percentage, # precision, positional notation, file size and pretty printing. @@ -135,7 +134,7 @@ module ActiveSupport::NumericWithFormat end # Ruby 2.4+ unifies Fixnum & Bignum into Integer. -if Integer == Fixnum +if 0.class == Integer Integer.prepend ActiveSupport::NumericWithFormat else Fixnum.prepend ActiveSupport::NumericWithFormat |