From db7c38634e8e9d1017210759f99f772a88f576c4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 23 Mar 2023 01:13:23 +0900 Subject: [PATCH] core_assertions.rb: Raise `Timeout::Error` explicitly So that `assert_raise` inside the block works. --- tool/lib/core_assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 52c2c6b388..1fdc0a34b8 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -763,7 +763,7 @@ eom t = tmax * i.fdiv(first) *arg = pre.call(i) message = "[#{i}]: in #{t}s" - Timeout.timeout(t, nil, message) do + Timeout.timeout(t, Timeout::Error, message) do st = Process.clock_gettime(Process::CLOCK_MONOTONIC) yield(*arg) assert_operator (Process.clock_gettime(Process::CLOCK_MONOTONIC) - st), :<=, t, message