diff options
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r-- | lib/bundler/lazy_specification.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index 2fcb2a788e..ecc6923439 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -70,7 +70,11 @@ module Bundler def __materialize__ search_object = Bundler.settings[:specific_platform] ? self : Dependency.new(name, version) - @specification = select_best_platform_match(source.specs.search(search_object), Gem::Platform.new(platform)) + @specification = if source.is_a?(Source::Gemspec) + source.gemspec.tap {|s| s.source = source } + else + source.specs.search(search_object).last + end end def respond_to?(*args) |