From 76540822609415dc5cfa8ea31bfafea602373a27 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 9 Feb 2006 20:05:11 +0000 Subject: Major components cleanup and speedup. Closes #3527. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/hash/indifferent_access.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/hash/indifferent_access.rb') 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 c96e63b169..adfba0fbf3 100644 --- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb @@ -14,13 +14,14 @@ class HashWithIndifferentAccess < Hash end alias_method :regular_writer, :[]= unless method_defined?(:regular_writer) + alias_method :regular_update, :update unless method_defined?(:regular_update) def []=(key, value) regular_writer(convert_key(key), convert_value(value)) end def update(other_hash) - other_hash.each {|key, value| self[key] = value} + other_hash.each_pair {|key, value| regular_writer(convert_key(key), convert_value(value))} self end alias_method :merge!, :update -- cgit v1.2.3