mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Check symlink in tmpdir and do not use empty path
This commit is contained in:
parent
4c5780e51e
commit
48d7ebe6fc
1 changed files with 5 additions and 1 deletions
|
@ -51,7 +51,11 @@ class TestFileUtils < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_have_symlink?
|
def check_have_symlink?
|
||||||
File.symlink "", ""
|
Dir.mktmpdir do |dir|
|
||||||
|
Dir.chdir(dir) do
|
||||||
|
File.symlink "symlink", "symlink"
|
||||||
|
end
|
||||||
|
end
|
||||||
rescue NotImplementedError, Errno::EACCES
|
rescue NotImplementedError, Errno::EACCES
|
||||||
return false
|
return false
|
||||||
rescue
|
rescue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue