From 43fdbd5e1ff48f1b55963a6bf3fbbdd3f90f0d67 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 20 Dec 2007 22:28:47 +0000 Subject: 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 --- activesupport/lib/active_support/core_ext/hash/keys.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3