From 1ae01bccc03ce400dd649e11aaf94df487694c77 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Mon, 14 Oct 2024 17:08:32 +0900 Subject: [PATCH] Suppress new RuboCop offenses This commit suppresses the following new RuboCop offenses: ```console $ bundle exec rubocop (snip) lib/rubocop/cop/performance/sum.rb:162:41: W: [Correctable] Lint/SafeNavigationConsistency: Use . instead of unnecessary &.. receiver&.literal? && receiver&.array_type? ^^ 118 files inspected, 1 offense detected, 1 offense autocorrectable RuboCop failed! ``` --- lib/rubocop/cop/performance/sum.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/performance/sum.rb b/lib/rubocop/cop/performance/sum.rb index 8662081e0d..f91a800396 100644 --- a/lib/rubocop/cop/performance/sum.rb +++ b/lib/rubocop/cop/performance/sum.rb @@ -159,7 +159,7 @@ def empty_array_literal?(node) def array_literal?(node) receiver = node.children.first - receiver&.literal? && receiver&.array_type? + receiver&.literal? && receiver.array_type? end def autocorrect(corrector, init, range)