diff options
author | Jim Myhrberg <contact@jimeh.me> | 2013-02-26 08:52:59 +0000 |
---|---|---|
committer | Jim Myhrberg <contact@jimeh.me> | 2013-02-26 08:52:59 +0000 |
commit | 968e176f0e4ac87b9386dd2d14456c1f42a15fc3 (patch) | |
tree | dd931e123fcaab3f7b388c56b0eaf9d38eb7a088 /lib/hashie/dash.rb | |
parent | 347bdb987f8a9d520c786a5356b1fd56d9703875 (diff) | |
download | hashie-968e176f0e4ac87b9386dd2d14456c1f42a15fc3.tar.gz |
Fix issue with #replace causing default values to override specified
Diffstat (limited to 'lib/hashie/dash.rb')
-rw-r--r-- | lib/hashie/dash.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hashie/dash.rb b/lib/hashie/dash.rb index ccee9aa..459c675 100644 --- a/lib/hashie/dash.rb +++ b/lib/hashie/dash.rb @@ -128,7 +128,7 @@ module Hashie end def replace(other_hash) - other_hash = other_hash.merge(self.class.defaults) + other_hash = self.class.defaults.merge(other_hash) (keys - other_hash.keys).each { |key| delete(key) } other_hash.each { |key, value| self[key] = value } end |