summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-29 02:09:55 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-29 11:28:26 +0900
commitd23964360335ad561f252cb6fe8e90df7ebee90e (patch)
treeb085591e7afe61dbed58d7b46bc0844e5dce5f69 /tool
parentecd42cfe39c13636defd4138cdbe92c709978812 (diff)
downloadruby-d23964360335ad561f252cb6fe8e90df7ebee90e.tar.gz
core_assertions.rb: Support old rubies
Some symbol argument might not be accepted by Process.clock_gettime.
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/core_assertions.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb
index 7625412e67..4887d944c5 100644
--- a/tool/lib/core_assertions.rb
+++ b/tool/lib/core_assertions.rb
@@ -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.