lib/bundler/lazy_specification.rb in bundler-1.13.1 vs lib/bundler/lazy_specification.rb in bundler-1.13.2

- old
+ new

@@ -53,10 +53,14 @@ out end def __materialize__ - @specification = source.specs.search(Gem::Dependency.new(name, version)).last + @specification = if source.is_a?(Source::Gemspec) && source.gemspec.name == name + source.gemspec.tap {|s| s.source = source } + else + source.specs.search(Gem::Dependency.new(name, version)).last + end end def respond_to?(*args) super || @specification ? @specification.respond_to?(*args) : nil end