aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/float
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/float')
-rw-r--r--activesupport/lib/active_support/core_ext/float/rounding.rb6
1 files changed, 4 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 989b1f8f80..062d466838 100644
--- a/activesupport/lib/active_support/core_ext/float/rounding.rb
+++ b/activesupport/lib/active_support/core_ext/float/rounding.rb
@@ -3,8 +3,10 @@ module ActiveSupport #:nodoc:
module Float #:nodoc:
module Rounding
def self.included(base) #:nodoc:
- base.send(:alias_method, :round_without_precision, :round)
- base.send(:alias_method, :round, :round_with_precision)
+ base.class_eval do
+ alias_method :round_without_precision, :round
+ alias_method :round, :round_with_precision
+ end
end
# Rounds the float with the specified precision.