Only coerce to Option when needed

Fixes Homebrew/homebrew#24833.
This commit is contained in:
Jack Nagel 2013-12-05 22:16:23 -06:00
parent 1564a89f44
commit b2b0f711b1

View File

@ -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-(.+)$/