aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-23 17:26:20 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-23 18:48:28 -0700
commitecbdec115bc87636f975b962bff7a9ac89a145fa (patch)
treee7267da44f338d111718a144de9adcb17e16cc9f
parentb6e28cea8c39d01cfc54becf1f5af752df5421ca (diff)
downloadrails-ecbdec115bc87636f975b962bff7a9ac89a145fa.tar.gz
rails-ecbdec115bc87636f975b962bff7a9ac89a145fa.tar.bz2
rails-ecbdec115bc87636f975b962bff7a9ac89a145fa.zip
making variable names a little more clear
-rw-r--r--activesupport/lib/active_support/core_ext/hash/reverse_merge.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb
index d7ebd5feef..a82cdfc360 100644
--- a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb
+++ b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb
@@ -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!