aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/hash_with_indifferent_access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/hash_with_indifferent_access.rb')
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb
index 61fc6475a0..543dab4a75 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -98,6 +98,10 @@ module ActiveSupport
super other_hash.with_indifferent_access
end
+ def reverse_merge!(other_hash)
+ replace(reverse_merge( other_hash ))
+ end
+
# Removes a specified key from the hash.
def delete(key)
super(convert_key(key))
@@ -109,7 +113,7 @@ module ActiveSupport
# Convert to a Hash with String keys.
def to_hash
- Hash.new(default).merge(self)
+ Hash.new(default).merge!(self)
end
protected