зеркало из https://github.com/github/ruby.git
Added comments for extended require by RubyGems
This commit is contained in:
Родитель
260ef51a73
Коммит
d041c6cebb
|
@ -36,11 +36,13 @@ module Kernel
|
||||||
|
|
||||||
path = path.to_path if path.respond_to? :to_path
|
path = path.to_path if path.respond_to? :to_path
|
||||||
|
|
||||||
|
# Ensure -I beats a default gem
|
||||||
|
# https://github.com/rubygems/rubygems/pull/1868
|
||||||
resolved_path = begin
|
resolved_path = begin
|
||||||
rp = nil
|
rp = nil
|
||||||
$LOAD_PATH[0...Gem.load_path_insert_index].each do |lp|
|
$LOAD_PATH[0...Gem.load_path_insert_index].each do |lp|
|
||||||
safe_lp = lp.dup.untaint
|
safe_lp = lp.dup.untaint
|
||||||
next if File.symlink? safe_lp
|
next if File.symlink? safe_lp # for backword compatibility
|
||||||
Gem.suffixes.each do |s|
|
Gem.suffixes.each do |s|
|
||||||
full_path = File.expand_path(File.join(safe_lp, "#{path}#{s}"))
|
full_path = File.expand_path(File.join(safe_lp, "#{path}#{s}"))
|
||||||
if File.file?(full_path)
|
if File.file?(full_path)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче