From d7a141daaeae145c453e64344137f833c8bfc0db Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Wed, 9 Aug 2023 15:38:03 +0900 Subject: [PATCH] Suppress a new RuboCop offense This commit suppresses the following new RuboCop offense: ```console $ bundle exec rubocop (snip) lib/rubocop/cop/performance/uri_default_parser.rb:28:11: C: [Correctable] Style/RedundantReturn: Redundant return detected. return unless uri_parser_new?(node) do |captured_value| ^^^^^^ ``` --- lib/rubocop/cop/performance/uri_default_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/performance/uri_default_parser.rb b/lib/rubocop/cop/performance/uri_default_parser.rb index 4ce34da0b2..5d50f8cfe2 100644 --- a/lib/rubocop/cop/performance/uri_default_parser.rb +++ b/lib/rubocop/cop/performance/uri_default_parser.rb @@ -25,7 +25,7 @@ class UriDefaultParser < Base PATTERN def on_send(node) - return unless uri_parser_new?(node) do |captured_value| + uri_parser_new?(node) do |captured_value| double_colon = captured_value ? '::' : '' message = format(MSG, double_colon: double_colon)