1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "Hash#symbolize_keys(!) optimizations"

Was slower in common case.

[#3891 state:open]

This reverts commit 2060977b76.
This commit is contained in:
Jeremy Kemper 2010-03-29 15:48:36 -07:00
parent 63026541b2
commit e30363617c

View file

@ -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