[rubygems/rubygems] Extract a local outside the loop
https://github.com/rubygems/rubygems/commit/da1492e9d7
This commit is contained in:
parent
5aa5aad48a
commit
07dca5c02c
Notes:
git
2020-06-05 07:33:42 +09:00
@ -43,8 +43,9 @@ module Kernel
|
|||||||
# https://github.com/rubygems/rubygems/pull/1868
|
# https://github.com/rubygems/rubygems/pull/1868
|
||||||
resolved_path = begin
|
resolved_path = begin
|
||||||
rp = nil
|
rp = nil
|
||||||
|
load_path_check_index = Gem.load_path_insert_index - Gem.activated_gem_paths
|
||||||
Gem.suffixes.each do |s|
|
Gem.suffixes.each do |s|
|
||||||
$LOAD_PATH[0...Gem.load_path_insert_index - Gem.activated_gem_paths].each do |lp|
|
$LOAD_PATH[0...load_path_check_index].each do |lp|
|
||||||
safe_lp = lp.dup.tap(&Gem::UNTAINT)
|
safe_lp = lp.dup.tap(&Gem::UNTAINT)
|
||||||
begin
|
begin
|
||||||
if File.symlink? safe_lp # for backward compatibility
|
if File.symlink? safe_lp # for backward compatibility
|
||||||
|
Loading…
x
Reference in New Issue
Block a user