aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-02-09 20:05:11 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-02-09 20:05:11 +0000
commit76540822609415dc5cfa8ea31bfafea602373a27 (patch)
tree962efec0474b2b30f2edded13b2d95e93e68f603 /activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
parent3a38c829e0790a4341dcb5784118731361f6c788 (diff)
downloadrails-76540822609415dc5cfa8ea31bfafea602373a27.tar.gz
rails-76540822609415dc5cfa8ea31bfafea602373a27.tar.bz2
rails-76540822609415dc5cfa8ea31bfafea602373a27.zip
Major components cleanup and speedup. Closes #3527.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/indifferent_access.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/indifferent_access.rb3
1 files changed, 2 insertions, 1 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 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