Skip to content

Commit

Permalink
Merge pull request sidekiq#2297 from davydovanton/revert-each-key
Browse files Browse the repository at this point in the history
Revert using #each_key in Hash class
  • Loading branch information
mperham committed Apr 10, 2015
2 parents cad13da + df57a68 commit e89f5f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sidekiq/core_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ def singleton_class?
rescue LoadError
class Hash
def stringify_keys
each_key do |key|
keys.each do |key|
self[key.to_s] = delete(key)
end
self
end if !{}.respond_to?(:stringify_keys)

def symbolize_keys
each_key do |key|
keys.each do |key|
self[(key.to_sym rescue key) || key] = delete(key)
end
self
Expand Down

0 comments on commit e89f5f7

Please sign in to comment.