From ac6b3c1b590a9c8c8698978e6d8a84890bbeb0fc Mon Sep 17 00:00:00 2001 From: George Ma Date: Thu, 21 Mar 2024 12:34:22 -0400 Subject: [PATCH] Disable Style/ArrayIntersect and undo rubocop autocorrect --- .rubocop.yml | 3 +++ lib/erb_lint/utils/block_map.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index f8e853a..09f6b58 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,9 @@ inherit_gem: Style/ClassMethodsDefinitions: Enabled: false +Style/ArrayIntersect: + Enabled: false + AllCops: Exclude: - 'vendor/**/*' diff --git a/lib/erb_lint/utils/block_map.rb b/lib/erb_lint/utils/block_map.rb index cdbe4e8..32a4fe6 100644 --- a/lib/erb_lint/utils/block_map.rb +++ b/lib/erb_lint/utils/block_map.rb @@ -214,7 +214,7 @@ def find_overlapping_pair @connections.each do |first| @connections.each do |second| next if first == second - return [first, second] if first.intersect?(second) + return [first, second] if (first & second).any? end end nil