diff options
author | Marcel Molina <marcel@vernix.org> | 2006-05-14 18:17:30 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2006-05-14 18:17:30 +0000 |
commit | f2b3deb85cab1389d6b895b2e45b33054a96a6ba (patch) | |
tree | 1b31f8191a3ac838d0bdf462f3184527bdeea1ee /activesupport/lib/active_support/core_ext | |
parent | f9f65433efa18969b81ec1a8ab8d74d01bfd464e (diff) | |
download | rails-f2b3deb85cab1389d6b895b2e45b33054a96a6ba.tar.gz rails-f2b3deb85cab1389d6b895b2e45b33054a96a6ba.tar.bz2 rails-f2b3deb85cab1389d6b895b2e45b33054a96a6ba.zip |
Don't destroy a HashWithIndifferentAccess if symbolize_keys! or stringify_keys! is called on it. Closes #5076. [Marcel Molina Jr., guy.naor@famundo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/indifferent_access.rb | 3 |
1 files changed, 3 insertions, 0 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 472e3ab7d1..1f645fabc9 100644 --- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb @@ -56,6 +56,9 @@ class HashWithIndifferentAccess < Hash def delete(key) super(convert_key(key)) end + + def stringify_keys!; self end + def symbolize_keys!; self end protected def convert_key(key) |