diff options
| author | Jack Nagel | 2012-08-12 00:58:48 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-12 00:58:48 -0500 |
| commit | 0549a9ab05c3c901089e9c2677896bc707c67815 (patch) | |
| tree | 4eea43c77eadacd110135f1cbb445f7b476e0570 /Library | |
| parent | c9f824b54a068c69f9c2202362f6114460ecf8d6 (diff) | |
| download | brew-0549a9ab05c3c901089e9c2677896bc707c67815.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 Homebrew/homebrew#14133.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 2 |
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 |
