diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-29 15:48:36 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-29 15:48:36 -0700 |
commit | e30363617cea5b51de2bb2e535c70092554514d0 (patch) | |
tree | 0d28ab6319a134223652b37c42fd652f97293563 /activesupport/lib/active_support | |
parent | 63026541b209cc11ffd74cf3ca04b89d1e437737 (diff) | |
download | rails-e30363617cea5b51de2bb2e535c70092554514d0.tar.gz rails-e30363617cea5b51de2bb2e535c70092554514d0.tar.bz2 rails-e30363617cea5b51de2bb2e535c70092554514d0.zip |
Revert "Hash#symbolize_keys(!) optimizations"
Was slower in common case.
[#3891 state:open]
This reverts commit 2060977b767061a42eb8db2d5c3a30d205a94123.
Diffstat (limited to 'activesupport/lib/active_support')
-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 e4d429fc2b..045a6944fa 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -22,7 +22,7 @@ class Hash # to +to_sym+. def symbolize_keys! keys.each do |key| - self[(key.to_sym rescue key)] = delete(key) if key.respond_to?(:to_sym) && !key.is_a?(Fixnum) + self[(key.to_sym rescue key) || key] = delete(key) end self end |