summaryrefslogtreecommitdiff
path: root/lib/hashie/extensions/indifferent_access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hashie/extensions/indifferent_access.rb')
-rw-r--r--lib/hashie/extensions/indifferent_access.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/hashie/extensions/indifferent_access.rb b/lib/hashie/extensions/indifferent_access.rb
index 55648a6..e6e670a 100644
--- a/lib/hashie/extensions/indifferent_access.rb
+++ b/lib/hashie/extensions/indifferent_access.rb
@@ -133,8 +133,10 @@ module Hashie
self
end
- def merge(*)
- super.convert!
+ def merge(*args)
+ result = super
+ IndifferentAccess.inject!(result) if hash_lacking_indifference?(result)
+ result.convert!
end
def merge!(*)