diff options
author | Laerti Papa <laerti.papa@xing.com> | 2018-10-03 23:16:55 +0200 |
---|---|---|
committer | Laerti Papa <laerti.papa@xing.com> | 2018-10-03 23:16:55 +0200 |
commit | 8dfc48d7262e6bab0f414dc1d59700670f9a589c (patch) | |
tree | d7a21bfc089be79da98d7b73271ce5783a84c337 /lib/hashie/mash.rb | |
parent | d097d02ef8d7584d1f3f9ff9c9b23bbf4287cd70 (diff) | |
download | hashie-8dfc48d7262e6bab0f414dc1d59700670f9a589c.tar.gz |
Reverse condition check in Mash#deep_update
Diffstat (limited to 'lib/hashie/mash.rb')
-rw-r--r-- | lib/hashie/mash.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index 37a903f..6e45c09 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -214,7 +214,7 @@ module Hashie def deep_update(other_hash, &blk) other_hash.each_pair do |k, v| key = convert_key(k) - if key?(key) && regular_reader(key).is_a?(Mash) && v.is_a?(::Hash) + if v.is_a?(::Hash) && key?(key) && regular_reader(key).is_a?(Mash) custom_reader(key).deep_update(v, &blk) else value = convert_value(v, true) |