aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/float/rounding.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/float/rounding.rb b/activesupport/lib/active_support/core_ext/float/rounding.rb
index 0b1ae4be7e..9bdf5bba7b 100644
--- a/activesupport/lib/active_support/core_ext/float/rounding.rb
+++ b/activesupport/lib/active_support/core_ext/float/rounding.rb
@@ -1,5 +1,6 @@
class Float
- remove_method :round
+ alias precisionless_round round
+ private :precisionless_round
# Rounds the float with the specified precision.
#
@@ -12,7 +13,7 @@ class Float
magnitude = 10.0 ** precision
(self * magnitude).round / magnitude
else
- super()
+ precisionless_round
end
end
end