Use the dependency object as the key in the inherited_options hash

This commit is contained in:
Jack Nagel 2014-08-24 16:09:55 -05:00
parent 8aabba670f
commit 1ef2819979

View File

@ -278,7 +278,7 @@ class FormulaInstaller
inherited_options = {} inherited_options = {}
expanded_deps = Dependency.expand(f, deps) do |dependent, dep| expanded_deps = Dependency.expand(f, deps) do |dependent, dep|
options = inherited_options[dep.name] = inherited_options_for(dep) options = inherited_options[dep] = inherited_options_for(dep)
build = effective_build_options_for( build = effective_build_options_for(
dependent, dependent,
inherited_options.fetch(dependent.name, []) inherited_options.fetch(dependent.name, [])
@ -295,7 +295,7 @@ class FormulaInstaller
end end
end end
expanded_deps.map { |dep| [dep, inherited_options[dep.name]] } expanded_deps.map { |dep| [dep, inherited_options[dep]] }
end end
def effective_build_options_for(dependent, inherited_options=[]) def effective_build_options_for(dependent, inherited_options=[])