diff options
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r-- | lib/timeout.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb index ba93a62f15..4e6f546e0c 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -29,6 +29,7 @@ class TimeoutError<StandardError end def timeout(sec) + return yield if sec == nil begin x = Thread.current y = Thread.start { |