diff options
Diffstat (limited to 'lib/bundler/stub_specification.rb')
-rw-r--r-- | lib/bundler/stub_specification.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb index deaa7905c9..2333a4318a 100644 --- a/lib/bundler/stub_specification.rb +++ b/lib/bundler/stub_specification.rb @@ -36,7 +36,7 @@ module Bundler # This is defined directly to avoid having to load every installed spec def missing_extensions? - stub.missing_extensions? + stub(true).missing_extensions? end def activated @@ -82,8 +82,8 @@ module Bundler # from `Gem.loaded_specs`, which can end up being self. # #_remote_specification has logic to handle this case, so delegate to that in that situation, # because otherwise we can end up with a stack overflow when calling #missing_extensions? - def stub - if @_remote_specification.nil? && @stub.instance_variable_get(:@data) && Gem.loaded_specs[name].equal?(self) + def stub(check = false) + if check && @_remote_specification.nil? && @stub.instance_variable_get(:@data) && Gem.loaded_specs[name].equal?(self) _remote_specification end @stub @@ -95,7 +95,7 @@ module Bundler @_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(@stub.loaded_from) + rs = Bundler.load_gemspec(@stub.loaded_from) Bundler.rubygems.stub_set_spec(@stub, rs) end |