1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Use Hash#each_key instead of Hash#keys.each

This commit is contained in:
Anton Davydov 2015-04-05 14:47:04 +03:00
parent be7d77d9ed
commit 4d389424e4

View file

@ -54,14 +54,14 @@ begin
rescue LoadError
class Hash
def stringify_keys
keys.each do |key|
each_key do |key|
self[key.to_s] = delete(key)
end
self
end if !{}.respond_to?(:stringify_keys)
def symbolize_keys
keys.each do |key|
each_key do |key|
self[(key.to_sym rescue key) || key] = delete(key)
end
self