Reference RuboCop issue.
This commit is contained in:
parent
71a79e7e04
commit
9d79cf1e9d
@ -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}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user