aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/build_options.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb
index 83afe362e..3c8c81eb2 100644
--- a/Library/Homebrew/build_options.rb
+++ b/Library/Homebrew/build_options.rb
@@ -132,7 +132,8 @@ class BuildOptions
end
def opposite_of option
- option = Option.new option
+ option = Option.new(option) unless Option == option
+
if option.name =~ /^with-(.+)$/
Option.new("without-#{$1}")
elsif option.name =~ /^without-(.+)$/