summaryrefslogtreecommitdiff
path: root/lib/hashie/dash.rb
diff options
context:
space:
mode:
authorJim Myhrberg <contact@jimeh.me>2013-02-26 08:52:59 +0000
committerJim Myhrberg <contact@jimeh.me>2013-02-26 08:52:59 +0000
commit968e176f0e4ac87b9386dd2d14456c1f42a15fc3 (patch)
treedd931e123fcaab3f7b388c56b0eaf9d38eb7a088 /lib/hashie/dash.rb
parent347bdb987f8a9d520c786a5356b1fd56d9703875 (diff)
downloadhashie-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.rb2
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