Fix type error

This commit is contained in:
Douglas Eichelberger 2023-02-24 09:29:37 -08:00
parent 7f3593e12d
commit cfdb0c2e4b

View File

@ -103,7 +103,8 @@ module Homebrew
tags.map do |tag| tags.map do |tag|
if regex if regex
# Use the first capture group (the version) # Use the first capture group (the version)
tag.scan(regex).first&.first # This code is not typesafe unless the regex includes a capture group
T.unsafe(tag.scan(regex).first)&.first
else else
# Remove non-digits from the start of the tag and use that as the # Remove non-digits from the start of the tag and use that as the
# version text # version text