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.
This commit is contained in:
Mike McQuaid 2024-07-25 12:14:06 +01:00
parent 5edcaf3f06
commit be01b6ea64
No known key found for this signature in database

View File

@ -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) }