1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

$LOAD_PATH elements should be real paths

Installed path may contain symbolic links.
This commit is contained in:
Nobuyoshi Nakada 2019-08-18 00:25:48 +09:00
parent 765eb18a45
commit 8b8e7e6e9e
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -293,7 +293,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni
@orig_LOAD_PATH = $LOAD_PATH.dup
$LOAD_PATH.map! do |s|
expand_path = File.expand_path(s)
expand_path = File.realpath(s) rescue File.expand_path(s)
if expand_path != s
expand_path.untaint
if s.instance_variable_defined?(:@gem_prelude_index)