summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-03 18:00:02 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 07:35:48 +0900
commit37abd2c390bb93fe1a306465bb5de35feb70a82a (patch)
treed7baf4c6aab3dea360a408b59421454c9828e055 /lib/rubygems/core_ext
parent00cd5d74cecb6aa4a184e57e2b8246ef6e45d458 (diff)
[rubygems/rubygems] Fix old rubies compat
https://github.com/rubygems/rubygems/commit/41e60cdb6b
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 89e3e33..4759f26 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].each do |lp|
+ $LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp|
Gem.suffixes.each do |s|
full_path = File.join(lp, "#{path}#{s}")
if File.file?(File.expand_path(full_path))