diff options
author | Samuel Williams <[email protected]> | 2021-02-11 21:29:17 +1300 |
---|---|---|
committer | Samuel Williams <[email protected]> | 2021-03-30 18:38:42 +1300 |
commit | 9b9bbaec111c34d15d75750e300d94fb5c30c8b1 (patch) | |
tree | 4f0946b1609fef7b8587bb1e25c9153aafae5c19 /lib/timeout.rb | |
parent | 4c53dc970bf82e4c5fb237be4b2404bcb07496d2 (diff) |
Update lib/timeout.rb
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4173
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r-- | lib/timeout.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb index 43f26f5869..9625db77a8 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -81,7 +81,7 @@ module Timeout message ||= "execution expired".freeze - if scheduler = Fiber.scheduler and scheduler.respond_to?(:timeout_raise) + if (scheduler = Fiber.scheduler)&.respond_to?(:timeout_raise) return scheduler.timeout_raise(sec, klass || Error, message, &block) end |