Fix type error

This commit is contained in:
Douglas Eichelberger 2023-02-28 18:03:42 -08:00
parent 9ab3cfb7a7
commit b8ddecf322
2 changed files with 3 additions and 3 deletions

View File

@ -76,8 +76,8 @@ module RuboCop
[:url, :version, :sha256],
[:url, :mirror, :version, :sha256],
]
minimum_methods = allowed_methods.first.map { |m| "`#{m}`" }.to_sentence
maximum_methods = allowed_methods.last.map { |m| "`#{m}`" }.to_sentence
minimum_methods = Utils.to_sentence(allowed_methods.first.map { |m| "`#{m}`" })
maximum_methods = Utils.to_sentence(allowed_methods.last.map { |m| "`#{m}`" })
on_system_bodies.each do |on_system_block, on_system_body|
method_name = on_system_block.method_name

View File

@ -47,7 +47,7 @@ module Utils
when 2
+"#{array[0]}#{two_words_connector}#{array[1]}"
else
+"#{array[0...-1].join(words_connector)}#{last_word_connector}#{array[-1]}"
+"#{T.must(array[0...-1]).join(words_connector)}#{last_word_connector}#{array[-1]}"
end
end
end