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:
parent
be7d77d9ed
commit
4d389424e4
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue