summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-18 00:25:48 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-18 00:32:21 +0900
commit8b8e7e6e9ec785ff49b3045ce06fa38b9f5cf809 (patch)
treef8c8637c3f2bc0566db9cbb4345bbb2107789535
parent765eb18a45c6fa8ebc55203bfe477e61c6a12490 (diff)
$LOAD_PATH elements should be real paths
Installed path may contain symbolic links.
-rw-r--r--lib/rubygems/test_case.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 4b43df539d..14212b9213 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -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)