From e71d1e2dd41e30c827c16d6192e011f4dba13fd6 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 13 Dec 2022 10:54:15 +0000 Subject: [PATCH] rubocop/lines: cleanup weird interpolation. --- Library/Homebrew/rubocops/lines.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb index 051a33688d..d17ed977e3 100644 --- a/Library/Homebrew/rubocops/lines.rb +++ b/Library/Homebrew/rubocops/lines.rb @@ -643,13 +643,13 @@ module RuboCop formula_path_strings(body_node, :prefix) do |p| if (match = regex_match_group(p, %r{^(/share/(info|man))$})) - problem "\"\#\{prefix}#{match[1]}\" should be \"\#{#{match[2]}}\"" + problem ['"#', "{prefix}", match[1], '" should be "#{', match[2], '}"'].join end if (match = regex_match_group(p, %r{^((/share/man/)(man[1-8]))})) - problem "\"\#\{prefix}#{match[1]}\" should be \"\#{#{match[3]}}\"" + problem ['"#', "{prefix}", match[1], '" should be "#{', match[3], '}"'].join end if (match = regex_match_group(p, %r{^(/(bin|include|libexec|lib|sbin|share|Frameworks))}i)) - problem "\"\#\{prefix}#{match[1]}\" should be \"\#{#{match[2].downcase}}\"" + problem ['"#', "{prefix}", match[1], '" should be "#{', match[2].downcase, '}"'].join end end