From f1c78b23313e63eb31a213cc7277b1eb206a581b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 12 Sep 2023 13:33:22 +0900 Subject: [PATCH] Suppress warning for shadowing outer local variable --- tool/lib/core_assertions.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 23de1f7e50ea67..4eb56b04be05de 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -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.