From c2cfb06e5de601438e7b71e08aaaf9c2b3113ee1 Mon Sep 17 00:00:00 2001 From: Stefan Kaes Date: Mon, 25 Sep 2023 20:31:03 +0200 Subject: [PATCH] trying to make Rubocop happy --- lib/dalli/protocol.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/dalli/protocol.rb b/lib/dalli/protocol.rb index ef7983b1..a54d10f6 100644 --- a/lib/dalli/protocol.rb +++ b/lib/dalli/protocol.rb @@ -8,10 +8,11 @@ module Protocol # Ruby 3.2 raises IO::TimeoutError on blocking reads/writes, but # it is not defined in earlier Ruby versions. require 'timeout' - if defined?(IO::TimeoutError) - TIMEOUT_ERRORS = [Timeout::Error, IO::TimeoutError] - else - TIMEOUT_ERRORS = [Timeout::Error] - end + TIMEOUT_ERRORS = + if defined?(IO::TimeoutError) + [Timeout::Error, IO::TimeoutError] + else + [Timeout::Error] + end end end