Skip to content

Commit

Permalink
Suppress warning for shadowing outer local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Sep 12, 2023
1 parent 8953fc7 commit 1afdb53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tool/lib/core_assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,9 @@ def assert_all_assertions_foreach(msg = nil, *keys, &block)
%w[
CLOCK_THREAD_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
CLOCK_MONOTONIC
].find do |clk|
if Process.const_defined?(clk)
[clk.to_sym, Process.const_get(clk)].find do |clk|
].find do |c|
if Process.const_defined?(c)
[c.to_sym, Process.const_get(c)].find do |clk|
Process.clock_gettime(clk)
rescue
# Constants may be defined but not implemented, e.g., mingw.
Expand Down

0 comments on commit 1afdb53

Please sign in to comment.