aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/indifferent_access.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
index d818d86a09..458f8961a3 100644
--- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
+++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
@@ -18,9 +18,12 @@ class HashWithIndifferentAccess < Hash
def []=(key, value)
regular_writer(convert_key(key), convert_value(value))
end
- def update(hash)
- hash.each {|key, value| self[key] = value}
+
+ def update(other_hash)
+ other_hash.each {|key, value| self[key] = value}
+ self
end
+ alias_method :merge!, :update
def key?(key)
super(convert_key(key))