ruby-changes:65704
From: Samuel <ko1@a...>
Date: Tue, 30 Mar 2021 14:39:01 +0900 (JST)
Subject: [ruby-changes:65704] 9b9bbaec11 (master): Update lib/timeout.rb
https://git.ruby-lang.org/ruby.git/commit/?id=9b9bbaec11 From 9b9bbaec111c34d15d75750e300d94fb5c30c8b1 Mon Sep 17 00:00:00 2001 From: Samuel Williams <samuel.williams@o...> Date: Thu, 11 Feb 2021 21:29:17 +1300 Subject: Update lib/timeout.rb Co-authored-by: Nobuyoshi Nakada <nobu@r...> --- lib/timeout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timeout.rb b/lib/timeout.rb index 43f26f5..9625db7 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -81,7 +81,7 @@ module Timeout https://github.com/ruby/ruby/blob/trunk/lib/timeout.rb#L81 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/