diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-20 22:28:47 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-20 22:28:47 +0000 |
commit | 43fdbd5e1ff48f1b55963a6bf3fbbdd3f90f0d67 (patch) | |
tree | fc50e7b004999dc12d3693e1c5e8ed1520a8962b /activesupport/lib | |
parent | b72763a96f0c936699d0f211be553f8f75accd07 (diff) | |
download | rails-43fdbd5e1ff48f1b55963a6bf3fbbdd3f90f0d67.tar.gz rails-43fdbd5e1ff48f1b55963a6bf3fbbdd3f90f0d67.tar.bz2 rails-43fdbd5e1ff48f1b55963a6bf3fbbdd3f90f0d67.zip |
Hash#symbolize_keys skips keys that can't be symbolized. Closes #10500.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/keys.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index 2bd4138be4..f104989df5 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -24,7 +24,7 @@ module ActiveSupport #:nodoc: # Return a new hash with all keys converted to symbols. def symbolize_keys inject({}) do |options, (key, value)| - options[key.to_sym || key] = value + options[(key.to_sym rescue key) || key] = value options end end |