From 97e52ddb5efbb3d76e7f477f3a23d2118b1d15de Mon Sep 17 00:00:00 2001 From: lineoffligbot <4628864+lineoffligbot@users.noreply.github.com> Date: Tue, 25 Aug 2026 13:52:57 +0200 Subject: [PATCH] Fix RuboCop offenses introduced by a newer release Autocorrect for offenses introduced by a newer RuboCop release within the Gemfile's ~> 1.85 constraint. --- lib/http/headers.rb | 4 ++-- lib/http/retriable/performer.rb | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/http/headers.rb b/lib/http/headers.rb index af588f5a..8025cd2b 100644 --- a/lib/http/headers.rb +++ b/lib/http/headers.rb @@ -24,8 +24,8 @@ class << self # @api public def coerce(object) object = if object.respond_to?(:to_hash) then object.to_hash - elsif object.respond_to?(:to_h) then object.to_h - elsif object.respond_to?(:to_a) then object.to_a + elsif object.respond_to?(:to_h) then object.to_h + elsif object.respond_to?(:to_a) then object.to_a else raise Error, "Can't coerce #{object.inspect} to Headers" end diff --git a/lib/http/retriable/performer.rb b/lib/http/retriable/performer.rb index ec6de21f..6fb69620 100644 --- a/lib/http/retriable/performer.rb +++ b/lib/http/retriable/performer.rb @@ -105,7 +105,7 @@ def finish_attempt(client, err) # # @api private # @return [Array] - # rubocop:disable Lint/RescueException + # rubocop:disable-next Lint/RescueException def try_request err, res = nil @@ -117,7 +117,6 @@ def try_request [err, res] end - # rubocop:enable Lint/RescueException # Checks whether the request should be retried #