From 598a60db1030bf176c2b2eaf540abc74b98f7572 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 12 Aug 2012 00:58:48 -0500 Subject: BuildOptions: store option tuples in a Set As options are stored in an object owned by the eigenclass of a formula, options defined in the Formula#options method can be added multiple times if the formula is instantiated multiple times. Store them in a set to prevent duplicates. Fixes #14133. Signed-off-by: Jack Nagel --- Library/Homebrew/formula_support.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 7958f457b..4c2a5e8ec 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -162,7 +162,7 @@ class BuildOptions @args = Array.new(args) # Extend it into an ARGV extension @args.extend(HomebrewArgvExtension) - @options = [] + @options = Set.new end def add name, description=nil -- cgit v1.2.3