diff options
author | Xavier Noria <fxn@hashref.com> | 2010-06-13 05:53:42 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-06-13 05:53:42 +0200 |
commit | 3359af63a518798ccc9c7f1c71e5507f6fe0d378 (patch) | |
tree | fe88b7c20142f7ecb8ed21ea5127241287e92e37 /activesupport/lib/active_support/ordered_hash.rb | |
parent | 72f9fec607c4a72b2e88995d0cb32b16b96e9068 (diff) | |
download | rails-3359af63a518798ccc9c7f1c71e5507f6fe0d378.tar.gz rails-3359af63a518798ccc9c7f1c71e5507f6fe0d378.tar.bz2 rails-3359af63a518798ccc9c7f1c71e5507f6fe0d378.zip |
Revert "hash merging with a block ignores non-existing keys altogether"
This reverts commit 72f9fec607c4a72b2e88995d0cb32b16b96e9068.
It is wrong, this feature is a little undocumented, doing some research.
Diffstat (limited to 'activesupport/lib/active_support/ordered_hash.rb')
-rw-r--r-- | activesupport/lib/active_support/ordered_hash.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index b721e6f70a..eda33f827e 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -131,7 +131,7 @@ module ActiveSupport def merge!(other_hash) if block_given? - other_hash.each {|k,v| self[k] = yield(k, self[k], v) if key? k} + other_hash.each {|k,v| self[k] = yield(k, self[k], v) } else other_hash.each {|k,v| self[k] = v } end |