From 49a463717e8edbd4e3f299bd7210aa91ddec2510 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sat, 1 Apr 2017 21:52:54 +0300 Subject: Prevent aliases Array#append and Array#prepend https://github.com/ruby/ruby/commit/f57d515d69b7a35477b9ba5d08fe117df1f1e275 --- activesupport/lib/active_support/core_ext/array/prepend_and_append.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb b/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb index 16a6789f8d..88a34128c9 100644 --- a/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb +++ b/activesupport/lib/active_support/core_ext/array/prepend_and_append.rb @@ -1,7 +1,7 @@ class Array # The human way of thinking about adding stuff to the end of a list is with append. - alias_method :append, :<< + alias_method :append, :push unless [].respond_to?(:append) # The human way of thinking about adding stuff to the beginning of a list is with prepend. - alias_method :prepend, :unshift + alias_method :prepend, :unshift unless [].respond_to?(:prepend) end -- cgit v1.2.3