summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-09-21 17:41:13 +0200
committerSamuel Giddins <segiddins@segiddins.me>2016-09-21 17:41:13 +0200
commit6c64e19a24f6ae92c5428d8b1be8f65c21c6c9db (patch)
treefbff12561ad97f61b7b2063ad1d92d1ca1f0a876
parent6775f652cf812eb6222a4486c5cf6c6ebfc281ea (diff)
downloadbundler-6c64e19a24f6ae92c5428d8b1be8f65c21c6c9db.tar.gz
¯\_(ツ)_/¯ just give up and special case Source::Gemspec
-rw-r--r--lib/bundler/lazy_specification.rb6
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)