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 --- .../lib/active_support/core_ext/date/conversions.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/date/conversions.rb') diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb index 6e864aee5e..3491dec25a 100644 --- a/activesupport/lib/active_support/core_ext/date/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date/conversions.rb @@ -11,11 +11,13 @@ module ActiveSupport #:nodoc: :rfc822 => "%e %b %Y" } - def self.included(klass) #:nodoc: - klass.send(:alias_method, :to_default_s, :to_s) - klass.send(:alias_method, :to_s, :to_formatted_s) - klass.send(:alias_method, :default_inspect, :inspect) - klass.send(:alias_method, :inspect, :readable_inspect) + def self.included(base) #:nodoc: + base.instance_eval do + alias_method :to_default_s, :to_s + alias_method :to_s, :to_formatted_s + alias_method :default_inspect, :inspect + alias_method :inspect, :readable_inspect + end end def to_formatted_s(format = :default) -- cgit v1.2.3