mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9"
This reverts commit 260ef51a73
.
This broke the stable versions of Ruby like 2.4 and 2.5
This commit is contained in:
parent
d041c6cebb
commit
221ba9b66c
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ 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[0...Gem.load_path_insert_index].each do |lp|
|
$LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp|
|
||||||
safe_lp = lp.dup.untaint
|
safe_lp = lp.dup.untaint
|
||||||
next if File.symlink? safe_lp # for backword compatibility
|
next if File.symlink? safe_lp # for backword compatibility
|
||||||
Gem.suffixes.each do |s|
|
Gem.suffixes.each do |s|
|
||||||
|
|
Loading…
Reference in a new issue