aboutsummaryrefslogtreecommitdiffstats
path: root/lib/timeout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r--lib/timeout.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index d805dce2a3..cf23fb5fb6 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -40,8 +40,7 @@ module Timeout
bt = caller
begin
throw(self, bt)
- rescue ArgumentError => e
- raise unless e.message.start_with?("uncaught throw")
+ rescue UncaughtThrowError
raise Error, message, backtrace
end
end