ruby-changes:57130
From: Hiroshi <ko1@a...>
Date: Sat, 17 Aug 2019 17:08:33 +0900 (JST)
Subject: [ruby-changes:57130] Hiroshi SHIBATA: 221ba9b66c (master): Revert "`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9"
https://git.ruby-lang.org/ruby.git/commit/?id=221ba9b66c From 221ba9b66c022a99227de8bf21db618666e17c42 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Sat, 17 Aug 2019 17:01:19 +0900 Subject: Revert "`Gem.load_path_insert_index always returns non-nil index after Ruby 1.9" This reverts commit 260ef51a73c067599826c8ab110c53994c1b6226. This broke the stable versions of Ruby like 2.4 and 2.5 diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb index b4aebf8..5516933 100755 --- a/lib/rubygems/core_ext/kernel_require.rb +++ b/lib/rubygems/core_ext/kernel_require.rb @@ -40,7 +40,7 @@ module Kernel https://github.com/ruby/ruby/blob/trunk/lib/rubygems/core_ext/kernel_require.rb#L40 # https://github.com/rubygems/rubygems/pull/1868 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| safe_lp = lp.dup.untaint next if File.symlink? safe_lp # for backword compatibility Gem.suffixes.each do |s| -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/