aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/tab.rb
diff options
context:
space:
mode:
authorJack Nagel2013-01-23 00:26:28 -0600
committerJack Nagel2013-01-26 12:14:47 -0600
commitcf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129 (patch)
treedef0a5578f371e60cf1d340637f9b9f33d97d2f1 /Library/Homebrew/tab.rb
parent046d802d0994be84802c6c50b6336b27b6d8ddd5 (diff)
downloadbrew-cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.tar.bz2
FormulaInstaller: construct new ARGV from an Options collection
The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to have certain properties, and the expectations are not consistent. Clear up this confusing mess by only dealing with Options collections. This keeps our representation of options uniform across the codebase. We can remove BuildOptions dependency on HomebrewArgvExtension, which allows us to pass any Array-like collection to Tab.create. The only other site inside of FormulaInstaller that uses the array is the #exec call, and there it is splatted and thus we can substitute our Options collection there as well.
Diffstat (limited to 'Library/Homebrew/tab.rb')
-rw-r--r--Library/Homebrew/tab.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 20f7b729b..15b0b59ea 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -77,11 +77,11 @@ class Tab < OpenStruct
end
def used_options
- Options.new(super.map { |o| Option.new(o) })
+ Options.coerce(super)
end
def unused_options
- Options.new(super.map { |o| Option.new(o) })
+ Options.coerce(super)
end
def options