1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

rubygems 2.6.7

* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update
  rubygems to 2.6.7, not the master, with r56225.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-09-28 01:16:43 +00:00
parent 69934aeb8d
commit b6139464f5
24 changed files with 149 additions and 427 deletions

View file

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