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
commitdb8431f39792cd8dd413674b916c807ed8ac3b34 (patch)
tree4ecfbfdd42dd52520185e815249f09a14ef4da7a /Library
parentdbd07eb092aa71c3dd26bc1b65f1592980ad16f9 (diff)
downloadhomebrew-db8431f39792cd8dd413674b916c807ed8ac3b34.tar.bz2
Only coerce to Option when needed
Fixes #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-(.+)$/