ruby-changes:61891
From: Kazuhiro <ko1@a...>
Date: Mon, 22 Jun 2020 17:12:06 +0900 (JST)
Subject: [ruby-changes:61891] 48d7ebe6fc (master): Check symlink in tmpdir and do not use empty path
https://git.ruby-lang.org/ruby.git/commit/?id=48d7ebe6fc From 48d7ebe6fc7dec0856498ddb93695c3797ae0101 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Mon, 22 Jun 2020 17:05:33 +0900 Subject: Check symlink in tmpdir and do not use empty path diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index f99d5f6..a72cb6bc 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -51,7 +51,11 @@ class TestFileUtils < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fileutils/test_fileutils.rb#L51 end def check_have_symlink? - File.symlink "", "" + Dir.mktmpdir do |dir| + Dir.chdir(dir) do + File.symlink "symlink", "symlink" + end + end rescue NotImplementedError, Errno::EACCES return false rescue -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/