Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 952154d commit aecdaa2Copy full SHA for aecdaa2
lib/timeout.rb
@@ -32,9 +32,8 @@ class Error < RuntimeError
32
def self.catch(*args)
33
exc = new(*args)
34
exc.instance_variable_set(:@thread, Thread.current)
35
- catch_value = Object.new
36
- exc.instance_variable_set(:@catch_value, catch_value)
37
- ::Kernel.catch(catch_value) {yield exc}
+ exc.instance_variable_set(:@catch_value, exc)
+ ::Kernel.catch(exc) {yield exc}
38
end
39
40
def exception(*)
0 commit comments