Fix type error
This commit is contained in:
parent
7f3593e12d
commit
cfdb0c2e4b
@ -103,7 +103,8 @@ module Homebrew
|
||||
tags.map do |tag|
|
||||
if regex
|
||||
# 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
|
||||
# Remove non-digits from the start of the tag and use that as the
|
||||
# version text
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user