aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/array
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/array')
-rw-r--r--activesupport/lib/active_support/core_ext/array/conversions.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb
index 426e53ea1c..8205843a2b 100644
--- a/activesupport/lib/active_support/core_ext/array/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/array/conversions.rb
@@ -25,12 +25,14 @@ module ActiveSupport #:nodoc:
def to_param
join '/'
end
-
- def self.included(klass) #:nodoc:
- klass.send(:alias_method, :to_default_s, :to_s)
- klass.send(:alias_method, :to_s, :to_formatted_s)
+
+ def self.included(base) #:nodoc:
+ 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)
case format
when :db