mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
Suppress warning for shadowing outer local variable
This commit is contained in:
parent
bfa4073dc2
commit
ebd44ef570
1 changed files with 3 additions and 3 deletions
|
@ -729,9 +729,9 @@ eom
|
||||||
%w[
|
%w[
|
||||||
CLOCK_THREAD_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
|
CLOCK_THREAD_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
|
||||||
CLOCK_MONOTONIC
|
CLOCK_MONOTONIC
|
||||||
].find do |clk|
|
].find do |c|
|
||||||
if Process.const_defined?(clk)
|
if Process.const_defined?(c)
|
||||||
[clk.to_sym, Process.const_get(clk)].find do |clk|
|
[c.to_sym, Process.const_get(c)].find do |clk|
|
||||||
Process.clock_gettime(clk)
|
Process.clock_gettime(clk)
|
||||||
rescue
|
rescue
|
||||||
# Constants may be defined but not implemented, e.g., mingw.
|
# Constants may be defined but not implemented, e.g., mingw.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue