mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
making variable names a little more clear
This commit is contained in:
@@ -21,7 +21,8 @@ class Hash
|
||||
# Performs the opposite of <tt>merge</tt>, with the keys and values from the first hash taking precedence over the second.
|
||||
# Modifies the receiver in place.
|
||||
def reverse_merge!(other_hash)
|
||||
merge!( other_hash ){|k,o,n| o }
|
||||
# right wins if there is no left
|
||||
merge!( other_hash ){|key,left,right| left }
|
||||
end
|
||||
|
||||
alias_method :reverse_update, :reverse_merge!
|
||||
|
||||
Reference in New Issue
Block a user