diff --git a/Gemfile b/Gemfile index f6af0bf1..dc6363ee 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ group :test do gem "backports" - gem "rubocop", "~> 1.57.0" + gem "rubocop", "~> 1.61.0" gem "rubocop-performance", "~> 1.19.1" gem "rubocop-rake", "~> 0.6.0" gem "rubocop-rspec", "~> 2.24.1" diff --git a/lib/http/chainable.rb b/lib/http/chainable.rb index 0fd144fd..1bda76d9 100644 --- a/lib/http/chainable.rb +++ b/lib/http/chainable.rb @@ -102,7 +102,7 @@ def timeout(options) %i[global read write connect].each do |k| next unless options.key? k - options["#{k}_timeout".to_sym] = options.delete k + options[:"#{k}_timeout"] = options.delete k end branch default_options.merge( diff --git a/lib/http/response/status/reasons.rb b/lib/http/response/status/reasons.rb index 0399d438..0a6b583b 100644 --- a/lib/http/response/status/reasons.rb +++ b/lib/http/response/status/reasons.rb @@ -75,7 +75,7 @@ class Status < ::Delegator 508 => "Loop Detected", 510 => "Not Extended", 511 => "Network Authentication Required" - }.each { |_, v| v.freeze }.freeze + }.each_value(&:freeze).freeze end end end diff --git a/spec/support/proxy_server.rb b/spec/support/proxy_server.rb index 36239879..131e99a0 100644 --- a/spec/support/proxy_server.rb +++ b/spec/support/proxy_server.rb @@ -18,7 +18,7 @@ class ProxyServer < WEBrick::HTTPProxyServer }.freeze def initialize - super CONFIG + super(CONFIG) end end @@ -34,6 +34,6 @@ class AuthProxyServer < WEBrick::HTTPProxyServer CONFIG = ProxyServer::CONFIG.merge ProxyAuthProc: AUTHENTICATOR def initialize - super CONFIG + super(CONFIG) end end