From b4feaf27d993cb6c686169203609143ddf274baf Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Mon, 4 Sep 2023 08:46:22 +0100 Subject: [PATCH] cask/url: accept Class for using in Cask::URL#initialize https://github.com/Homebrew/brew/pull/15754 fixed `Cask::URL::DSL#initialize`, but we also need to fix `Cask::URL#initialize` as that takes the same parameters. Error: ``` Error: Cask 'mycask' definition is invalid: 'url' stanza failed with: Parameter 'using': Expected type T.nilable(Symbol), got type Class with value MyCustomDownloadStrategy Caller: /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/sorbet-runtime-0.5.10461/lib/types/private/methods/call_validation.rb:113 ``` Refs: https://github.com/Homebrew/brew/issues/15750 --- Library/Homebrew/cask/url.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/url.rb b/Library/Homebrew/cask/url.rb index 901aeb3953..97021314ce 100644 --- a/Library/Homebrew/cask/url.rb +++ b/Library/Homebrew/cask/url.rb @@ -148,7 +148,7 @@ module Cask params( uri: T.nilable(T.any(URI::Generic, String)), verified: T.nilable(String), - using: T.nilable(Symbol), + using: T.any(Class, Symbol, NilClass), tag: T.nilable(String), branch: T.nilable(String), revisions: T.nilable(T::Array[String]),