Skip to content

Commit

Permalink
Fix wrong argument passing.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Sep 5, 2024
1 parent 123a2ac commit 846cf25
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,13 @@ def synced_with_other_formulae?
params(name: String, klass: T.class_of(Resource), block: T.nilable(T.proc.bind(Resource).void))
.returns(T.nilable(Resource))
}
def resource(name = T.unsafe(nil), klass = T.unsafe(nil), &block) = active_spec.resource(*name, *klass, &block)
def resource(name = T.unsafe(nil), klass = T.unsafe(nil), &block)
if klass.nil?
active_spec.resource(*name, &block)
else
active_spec.resource(name, klass)
end
end

# Old names for the formula.
#
Expand Down

0 comments on commit 846cf25

Please sign in to comment.