diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-03 18:00:02 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-17 07:35:48 +0900 |
commit | 37abd2c390bb93fe1a306465bb5de35feb70a82a (patch) | |
tree | d7baf4c6aab3dea360a408b59421454c9828e055 /lib | |
parent | 00cd5d74cecb6aa4a184e57e2b8246ef6e45d458 (diff) |
[rubygems/rubygems] Fix old rubies compat
https://github.com/rubygems/rubygems/commit/41e60cdb6b
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 89e3e33db2..4759f26090 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)) |