diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-29 14:40:14 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-29 15:28:40 +0900 |
commit | e801e9ba65f6d98f6fee32a1e7e553e6586230cd (patch) | |
tree | 37d965a232d09866046a8fc70d47f53cb42cb2e6 /spec/mspec | |
parent | 32e7d9140eb2bc9890a690fd62bf1690ee8fd5e3 (diff) | |
download | ruby-e801e9ba65f6d98f6fee32a1e7e553e6586230cd.tar.gz |
[ruby/spec] expand temporary directory to the real path
It may contain symbolic links.
Diffstat (limited to 'spec/mspec')
-rw-r--r-- | spec/mspec/lib/mspec/helpers/tmp.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/mspec/lib/mspec/helpers/tmp.rb b/spec/mspec/lib/mspec/helpers/tmp.rb index 433c0b6d88..df242f73c1 100644 --- a/spec/mspec/lib/mspec/helpers/tmp.rb +++ b/spec/mspec/lib/mspec/helpers/tmp.rb @@ -6,9 +6,9 @@ SPEC_TEMP_DIR_PID = Process.pid SPEC_TEMP_DIR_LIST = [] if tmpdir = ENV['SPEC_TEMP_DIR'] - temppath = File.expand_path(tmpdir) + "/" + temppath = File.realdirpath(tmpdir) + "/" else - tmpdir = File.expand_path("rubyspec_temp") + tmpdir = File.realdirpath("rubyspec_temp") temppath = tmpdir + "/#{SPEC_TEMP_DIR_PID}" SPEC_TEMP_DIR_LIST << tmpdir end |