class Bundler::Resolver
def search(dep)
def search(dep) if base = @base[dep.name] and base.any? reqs = [dep.requirement.as_list, base.first.version.to_s].flatten.compact d = Gem::Dependency.new(base.first.name, *reqs) 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