aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/hash_with_indifferent_access.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-04-26 23:32:30 -0700
committerwycats <wycats@gmail.com>2010-04-26 23:32:30 -0700
commit91963e9e33eb5a28297323f1346aeb8b643e9d65 (patch)
tree0452dbaf63110fb5a19c958da50d4677dee11333 /activesupport/lib/active_support/hash_with_indifferent_access.rb
parentd5d717161d853d8d7240da59b41a879bdac6e982 (diff)
parentc1d73270717f30498f8f4d55d6695509107c2834 (diff)
downloadrails-91963e9e33eb5a28297323f1346aeb8b643e9d65.tar.gz
rails-91963e9e33eb5a28297323f1346aeb8b643e9d65.tar.bz2
rails-91963e9e33eb5a28297323f1346aeb8b643e9d65.zip
Merge branch 'master' of github.com:rails/rails
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 8241b69c8b..f64f0f44cc 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/hash/keys'
+
# This class has dubious semantics and we only have it so that
# people can write params[:key] instead of params['key']
# and they get the same value for both keys.
@@ -112,7 +114,9 @@ module ActiveSupport
end
def stringify_keys!; self end
- def symbolize_keys!; self end
+ def stringify_keys; dup end
+ undef :symbolize_keys!
+ def symbolize_keys; to_hash.symbolize_keys end
def to_options!; self end
# Convert to a Hash with String keys.