From be01b6ea64b881fc1bdd9e8db73a9e7928c884d8 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 25 Jul 2024 12:14:06 +0100 Subject: [PATCH] version: use `T.unsafe` for https://srb.help/7019 In some configurations, Sorbet gets upset by the `version.to_json` call in `Library/Homebrew/version.rb`. This is because Sorbet's splat support is lacking and it cannot handle the `*options` argument when it does not know the size. --- Library/Homebrew/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index 0c9005219e..4e6f14a267 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -732,7 +732,7 @@ class Version sig { params(options: T.untyped).returns(String) } def to_json(*options) - version.to_json(*options) + T.unsafe(version).to_json(*options) end sig { params(method: T.any(Symbol, String), include_all: T::Boolean).returns(T::Boolean) }