aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/tab.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/tab.rb')
-rw-r--r--Library/Homebrew/tab.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 984b587ff..975e2a610 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -147,12 +147,15 @@ class Tab < OpenStruct
end
def with?(val)
- name = val.respond_to?(:option_name) ? val.option_name : val
- include?("with-#{name}") || unused_options.include?("without-#{name}")
+ option_names = val.respond_to?(:option_names) ? val.option_names : [val]
+
+ option_names.any? do |name|
+ include?("with-#{name}") || unused_options.include?("without-#{name}")
+ end
end
- def without?(name)
- !with? name
+ def without?(val)
+ !with?(val)
end
def include?(opt)