diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-04-01 21:52:54 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-04-02 17:13:28 +0300 |
commit | 49a463717e8edbd4e3f299bd7210aa91ddec2510 (patch) | |
tree | 50d04d4f90f913962bee8c77939f23c0af7a5f96 /activesupport/lib | |
parent | 19ae6597b844e11842971c4f9298d5fc7014704d (diff) | |
download | rails-49a463717e8edbd4e3f299bd7210aa91ddec2510.tar.gz rails-49a463717e8edbd4e3f299bd7210aa91ddec2510.tar.bz2 rails-49a463717e8edbd4e3f299bd7210aa91ddec2510.zip |
Prevent aliases Array#append and Array#prepend
https://github.com/ruby/ruby/commit/f57d515d69b7a35477b9ba5d08fe117df1f1e275
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/prepend_and_append.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |