class Bundler::Resolver
def search(dep)
def search(dep) if base = @base[dep.name] and base.any? d = Gem::Dependency.new(base.first.name, *[dep.requirement.as_list, base.first.version].flatten) else d = dep.dep end index = @source_requirements[d.name] || @index results = index.search_for_all_platforms(d, @base[d.name]) if results.any? version = results.first.version nested = [[]] results.each do |spec| if spec.version != version nested << [] version = spec.version end nested.last << spec end nested.map { |a| SpecGroup.new(a) }.select { |sg| sg.for?(dep.__platform) } else [] end end