diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-17 12:33:38 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-17 15:12:46 +0900 |
commit | 260ef51a73c067599826c8ab110c53994c1b6226 (patch) | |
tree | ce5b43d4bbc101157685e72f25aced9bd2e49f2d /lib | |
parent | 06fcf88d695c8bfb6703966dd26629642ff7bf2d (diff) | |
download | ruby-260ef51a73c067599826c8ab110c53994c1b6226.tar.gz |
`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/rubygems/core_ext/kernel_require.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb index d121d82a85..cc7ec7ee71 100755 --- a/lib/rubygems/core_ext/kernel_require.rb +++ b/lib/rubygems/core_ext/kernel_require.rb @@ -38,7 +38,7 @@ module Kernel resolved_path = begin rp = nil - $LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp| + $LOAD_PATH[0...Gem.load_path_insert_index].each do |lp| safe_lp = lp.dup.untaint next if File.symlink? safe_lp Gem.suffixes.each do |s| |