Skip to content

Commit

Permalink
Revert "Hash#symbolize_keys(!) optimizations"
Browse files Browse the repository at this point in the history
Was slower in common case.

[#3891 state:open]

This reverts commit 2060977.
  • Loading branch information
jeremy committed Mar 29, 2010
1 parent 6302654 commit e303636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/core_ext/hash/keys.rb
Expand Up @@ -22,7 +22,7 @@ def symbolize_keys
# 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
Expand Down

0 comments on commit e303636

Please sign in to comment.