summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Nadeau <julian@jnadeau.ca>2017-05-05 11:08:37 -0400
committerJulian Nadeau <julian@jnadeau.ca>2017-05-05 11:08:37 -0400
commita542e2b5f982ee423ce6dad8d0e99815c1d0db07 (patch)
tree335dcc09e9875bb59d6fc13753128efe169571cd
parent3c6e7ab7e6a2686271f3dc3baa47b3ba6d9b8c6b (diff)
downloadbundler-jules2689-bundler-stub-spec.tar.gz
-rw-r--r--lib/bundler/stub_specification.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index 562a58d39f..aeacf245a3 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -87,6 +87,10 @@ module Bundler
def _remote_specification
@_remote_specification ||= begin
rs = stub.to_spec
+ if rs.equal?(self) # happens when to_spec gets the spec from Gem.loaded_specs
+ rs = Gem::Specification.load(loaded_from)
+ Bundler.rubygems.stub_set_spec(stub, rs)
+ end
unless rs
raise GemspecError, "The gemspec for #{full_name} at #{loaded_from}" \