core_assertions.rb: Support old rubies
Some symbol argument might not be accepted by Process.clock_gettime.
This commit is contained in:
parent
ecd42cfe39
commit
d239643603
Notes:
git
2023-04-29 02:28:47 +00:00
@ -743,8 +743,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…
x
Reference in New Issue
Block a user