parent
19ae6597b8
commit
49a463717e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user