Skip to content

Commit c41b01a

Browse files
znzhsbt
authored andcommitted
Check symlink in tmpdir and do not use empty path
1 parent 2ae38a8 commit c41b01a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/fileutils/test_fileutils.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def have_symlink?
5151
end
5252

5353
def check_have_symlink?
54-
File.symlink "", ""
54+
Dir.mktmpdir do |dir|
55+
Dir.chdir(dir) do
56+
File.symlink "symlink", "symlink"
57+
end
58+
end
5559
rescue NotImplementedError, Errno::EACCES
5660
return false
5761
rescue

0 commit comments

Comments
 (0)