Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Hash#symbolize_keys(!) optimizations"

Was slower in common case.

[#3891 state:open]

This reverts commit 2060977.
  • Loading branch information...
commit e30363617cea5b51de2bb2e535c70092554514d0 1 parent 6302654
@jeremy jeremy authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/core_ext/hash/keys.rb
View
2  activesupport/lib/active_support/core_ext/hash/keys.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.