aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-12-05 22:16:23 -0600
committerJack Nagel2013-12-05 22:17:01 -0600
commitb2b0f711b1e0ddbb6714291943a77f564a07cf59 (patch)
tree62ecde28a4031e06c0fcc5552fbdcde09bffd61f /Library
parent1564a89f443d2e2b36223d68a3a07119485b1215 (diff)
downloadbrew-b2b0f711b1e0ddbb6714291943a77f564a07cf59.tar.bz2
Only coerce to Option when needed
Fixes Homebrew/homebrew#24833.
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-(.+)$/