From 041b9b8a1c1661f90e8e586fddce981bfdb17f11 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 14 Sep 2007 00:34:43 +0000 Subject: Some 1.9 forward compatibility git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/float/rounding.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/float') 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. -- cgit v1.2.3