From cfdb0c2e4bf1e908465aa860be7fc5437b036661 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 24 Feb 2023 09:29:37 -0800 Subject: [PATCH] Fix type error --- Library/Homebrew/livecheck/strategy/git.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/livecheck/strategy/git.rb b/Library/Homebrew/livecheck/strategy/git.rb index 8b0d6c2d5a..1843b3ab9f 100644 --- a/Library/Homebrew/livecheck/strategy/git.rb +++ b/Library/Homebrew/livecheck/strategy/git.rb @@ -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