aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/rubocops/lines_cop.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb
index dfa510035..d9e40c2de 100644
--- a/Library/Homebrew/rubocops/lines_cop.rb
+++ b/Library/Homebrew/rubocops/lines_cop.rb
@@ -331,6 +331,7 @@ module RuboCop
end
find_instance_method_call(body_node, "Dir", :[]) do |method|
+ next unless parameters(method).size == 1
path = parameters(method).first
next unless path.str_type?
next unless match = regex_match_group(path, /^[^\*{},]+$/)