aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-08-12 00:58:48 -0500
committerJack Nagel2012-08-12 00:58:48 -0500
commit598a60db1030bf176c2b2eaf540abc74b98f7572 (patch)
treef9ad272ec75d20bf59c2017de54a7c31d8c9529b /Library
parent91081897c09ccd43f0ea222083d878193b2d508d (diff)
downloadhomebrew-598a60db1030bf176c2b2eaf540abc74b98f7572.tar.bz2
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 <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_support.rb2
1 files changed, 1 insertions, 1 deletions
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