Skip to content

Commit

Permalink
cask/url: accept Class for using in Cask::URL#initialize
Browse files Browse the repository at this point in the history
Homebrew#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: Homebrew#15750
  • Loading branch information
gibfahn authored and dduugg committed Sep 30, 2023
1 parent 20b78e6 commit 1ad7f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def respond_to_missing?(method, include_all)
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]),
Expand Down

0 comments on commit 1ad7f0a

Please sign in to comment.