From f56e9387c8de5ed4e692e7a6bd1f3c1094cf1407 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 20 Jan 2024 16:33:29 +0000 Subject: [PATCH] Remove unnecessary rubocop disable comments. (#1551) These were added in #1550 because of an unsafe autocorrect, but have since been addressed in https://github.com/rubocop/rubocop/pull/12628 --- lib/faraday/adapter/test.rb | 28 ++++++++++++++-------------- lib/faraday/middleware_registry.rb | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/faraday/adapter/test.rb b/lib/faraday/adapter/test.rb index fe291255c..c637d139a 100644 --- a/lib/faraday/adapter/test.rb +++ b/lib/faraday/adapter/test.rb @@ -99,32 +99,32 @@ def match(env) matches?(consumed, env) end - def get(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding - new_stub(:get, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding + def get(path, headers = {}, &block) + new_stub(:get, path, headers, &block) end - def head(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding - new_stub(:head, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding + def head(path, headers = {}, &block) + new_stub(:head, path, headers, &block) end - def post(path, body = nil, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding - new_stub(:post, path, headers, body, &block) # rubocop:disable Style/ArgumentsForwarding + def post(path, body = nil, headers = {}, &block) + new_stub(:post, path, headers, body, &block) end - def put(path, body = nil, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding - new_stub(:put, path, headers, body, &block) # rubocop:disable Style/ArgumentsForwarding + def put(path, body = nil, headers = {}, &block) + new_stub(:put, path, headers, body, &block) end - def patch(path, body = nil, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding - new_stub(:patch, path, headers, body, &block) # rubocop:disable Style/ArgumentsForwarding + def patch(path, body = nil, headers = {}, &block) + new_stub(:patch, path, headers, body, &block) end - def delete(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding - new_stub(:delete, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding + def delete(path, headers = {}, &block) + new_stub(:delete, path, headers, &block) end - def options(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding - new_stub(:options, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding + def options(path, headers = {}, &block) + new_stub(:options, path, headers, &block) end # Raises an error if any of the stubbed calls have not been made. diff --git a/lib/faraday/middleware_registry.rb b/lib/faraday/middleware_registry.rb index 68895de4c..fc70e2b87 100644 --- a/lib/faraday/middleware_registry.rb +++ b/lib/faraday/middleware_registry.rb @@ -59,9 +59,9 @@ def lookup_middleware(key) private - def middleware_mutex(&block) # rubocop:disable Style/ArgumentsForwarding + def middleware_mutex(&block) @middleware_mutex ||= Monitor.new - @middleware_mutex.synchronize(&block) # rubocop:disable Style/ArgumentsForwarding + @middleware_mutex.synchronize(&block) end def load_middleware(key)