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

[ruby/spec] expand temporary directory to the real path

It may contain symbolic links.
This commit is contained in:
Nobuyoshi Nakada 2020-04-29 14:40:14 +09:00
parent 32e7d9140e
commit e801e9ba65
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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