lib/bundler/definition.rb in bundler-1.0.0.beta.2 vs lib/bundler/definition.rb in bundler-1.0.0.beta.3

- old
+ new

@@ -68,10 +68,19 @@ @sources.each { |s| s.remote! } specs end def specs - @specs ||= resolve.materialize(requested_dependencies) + @specs ||= begin + specs = resolve.materialize(requested_dependencies) + + unless specs["bundler"].any? + bundler = index.search(Gem::Dependency.new('bundler', VERSION)).last + specs["bundler"] = bundler if bundler + end + + specs + end end def missing_specs missing = [] resolve.materialize(requested_dependencies, missing)