From d23964360335ad561f252cb6fe8e90df7ebee90e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 29 Apr 2023 02:09:55 +0900 Subject: core_assertions.rb: Support old rubies Some symbol argument might not be accepted by Process.clock_gettime. --- tool/lib/core_assertions.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tool') 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. -- cgit v1.2.1