Merge rubygems master.

This is RC version of Rubygems 2.7.0.
  688fb7e83c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-10-08 01:32:18 +00:00
parent 6b05153a3a
commit c00e84327f
96 changed files with 2021 additions and 701 deletions

View file

@ -41,8 +41,7 @@ module Kernel
path = path.to_path if path.respond_to? :to_path
spec = Gem.find_unresolved_default_spec(path)
if spec
if spec = Gem.find_unresolved_default_spec(path)
Gem.remove_unresolved_default_spec(spec)
begin
Kernel.send(:gem, spec.name)
@ -66,12 +65,10 @@ module Kernel
#--
# TODO request access to the C implementation of this to speed up RubyGems
spec = Gem::Specification.find_active_stub_by_path path
begin
if Gem::Specification.find_active_stub_by_path(path)
RUBYGEMS_ACTIVATION_MONITOR.exit
return gem_original_require(path)
end if spec
end
# Attempt to find +path+ in any unresolved gems...
@ -109,7 +106,7 @@ module Kernel
# Ok, now find a gem that has no conflicts, starting
# at the highest version.
valid = found_specs.reject { |s| s.has_conflicts? }.first
valid = found_specs.find { |s| !s.has_conflicts? }
unless valid then
le = Gem::LoadError.new "unable to find a version of '#{names.first}' to activate"
@ -143,4 +140,3 @@ module Kernel
private :require
end