diff options
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r-- | lib/timeout.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb index cf23fb5fb6..fec7b9428c 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -31,17 +31,16 @@ module Timeout def self.catch(*args) exc = new(*args) exc.instance_variable_set(:@thread, Thread.current) - exc.freeze ::Kernel.catch(exc) {yield exc} end def exception(*) + # TODO: use Fiber.current to see if self can be thrown if self.thread == Thread.current bt = caller begin throw(self, bt) rescue UncaughtThrowError - raise Error, message, backtrace end end self |