aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time/conversions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time/conversions.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/time/conversions.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb
index 7829c2e581..742f71e0a6 100644
--- a/activesupport/lib/active_support/core_ext/time/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/time/conversions.rb
@@ -12,9 +12,11 @@ module ActiveSupport #:nodoc:
:rfc822 => "%a, %d %b %Y %H:%M:%S %z"
}
- def self.included(klass)
- klass.send(:alias_method, :to_default_s, :to_s)
- klass.send(:alias_method, :to_s, :to_formatted_s)
+ def self.included(base)
+ base.class_eval do
+ alias_method :to_default_s, :to_s
+ alias_method :to_s, :to_formatted_s
+ end
end
def to_formatted_s(format = :default)