Skip to content

Commit

Permalink
style: Suppress Style/HashEachMethods cop
Browse files Browse the repository at this point in the history
```
Style/HashEachMethods: Use each_value instead of each and remove the unused _name block argument.
```
  • Loading branch information
mishina2228 committed Dec 7, 2023
1 parent ef491d1 commit 7504d54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/god.rb
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def self.control(name, command)
# Returns true on success, false if all tasks could not be stopped within 10
# seconds
def self.stop_all
watches.sort.each do |_name, w|
watches.sort.each_value do |w|
Thread.new do
w.action(:stop)
w.unmonitor if w.state != :unmonitored
Expand Down
2 changes: 1 addition & 1 deletion test/test_god.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup

def teardown
God.main&.kill
God.watches&.each do |_k, w|
God.watches&.each_value do |w|
w.driver.thread.kill
end
God.reset
Expand Down
2 changes: 1 addition & 1 deletion test/test_god_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def terminate
ensure
God.stop_all
God.terminate # use our monkey-patched terminate
God.watches.each do |_name, w|
God.watches.each_value do |w|
w.stop_signal = 'KILL'
w.action(:stop)
end
Expand Down

0 comments on commit 7504d54

Please sign in to comment.