summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 12:33:38 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 15:12:46 +0900
commit260ef51a73c067599826c8ab110c53994c1b6226 (patch)
treece5b43d4bbc101157685e72f25aced9bd2e49f2d /lib/rubygems/core_ext
parent06fcf88d695c8bfb6703966dd26629642ff7bf2d (diff)
`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9
Diffstat (limited to 'lib/rubygems/core_ext')
-rwxr-xr-xlib/rubygems/core_ext/kernel_require.rb2
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 d121d82..cc7ec7e 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|