diff --git a/Library/Homebrew/utils/formatter.rb b/Library/Homebrew/utils/formatter.rb index 35dc881837..36542d7389 100644 --- a/Library/Homebrew/utils/formatter.rb +++ b/Library/Homebrew/utils/formatter.rb @@ -110,7 +110,10 @@ module Formatter end def comma_and(*items) - *items, last = items.map(&:to_s) # rubocop:disable Lint/ShadowedArgument, TODO: Remove when RuboCop 0.57.3 is released. + # TODO: Remove when RuboCop 0.57.3 is released. + # False positive has been fixed and merged, but is not yet in a + # stable release: https://github.com/rubocop-hq/rubocop/pull/6038 + *items, last = items.map(&:to_s) # rubocop:disable Lint/ShadowedArgument return last if items.empty? "#{items.join(", ")} and #{last}"