tab: correctly handle options request.
Because a `Tab` is an `OpenStruct` the existing calls to `any_args_or_options?` would always return `false`. This means that `Formula#declared_runtime_dependencies` would never call `Tab#without?` to check whether a dependency has been brought in by an option. Fixes #4407
This commit is contained in:
parent
d6a245c051
commit
ea97da9879
@ -211,6 +211,10 @@ class Tab < OpenStruct
|
||||
end
|
||||
end
|
||||
|
||||
def any_args_or_options?
|
||||
!used_options.empty? || !unused_options.empty?
|
||||
end
|
||||
|
||||
def with?(val)
|
||||
option_names = val.respond_to?(:option_names) ? val.option_names : [val]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user