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:
parent
63026541b2
commit
e30363617c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue