[rubygems/rubygems] Fix jruby issue

https://github.com/rubygems/rubygems/commit/fc3f722164
This commit is contained in:
David Rodríguez 2019-05-19 11:31:17 -04:00 committed by Hiroshi SHIBATA
parent 37abd2c390
commit b8984370da
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -40,8 +40,8 @@ module Kernel
rp = nil
$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))
full_path = File.expand_path(File.join(lp, "#{path}#{s}"))
if File.file?(full_path)
rp = full_path
break
end