summaryrefslogtreecommitdiff
path: root/tool/lib/core_assertions.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-09-12 13:33:22 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-09-12 15:10:16 +0900
commitf1c78b23313e63eb31a213cc7277b1eb206a581b (patch)
tree180eb15910afc42739f78e2f0409595c7a944ccb /tool/lib/core_assertions.rb
parent8953fc774c542a8bf3c9a2be39bcbd1d5341e3a8 (diff)
Suppress warning for shadowing outer local variable
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/8419
Diffstat (limited to 'tool/lib/core_assertions.rb')
-rw-r--r--tool/lib/core_assertions.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb
index 23de1f7e50..4eb56b04be 100644
--- a/tool/lib/core_assertions.rb
+++ b/tool/lib/core_assertions.rb
@@ -778,9 +778,9 @@ eom
%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.