mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 00:54:01 +02:00
core_assertions.rb: Support old rubies
Some symbol argument might not be accepted by Process.clock_gettime.
This commit is contained in:
parent
e67ef294fe
commit
bfa4073dc2
1 changed files with 1 additions and 2 deletions
|
@ -731,8 +731,7 @@ eom
|
|||
CLOCK_MONOTONIC
|
||||
].find do |clk|
|
||||
if Process.const_defined?(clk)
|
||||
clk = clk.to_sym
|
||||
begin
|
||||
[clk.to_sym, Process.const_get(clk)].find do |clk|
|
||||
Process.clock_gettime(clk)
|
||||
rescue
|
||||
# Constants may be defined but not implemented, e.g., mingw.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue