ruby-changes:54756
From: nobu <ko1@a...>
Date: Fri, 1 Feb 2019 10:31:42 +0900 (JST)
Subject: [ruby-changes:54756] nobu:r66973 (trunk): Run r66972 assertion only when a sticky-bit makes sense
nobu 2019-02-01 10:31:34 +0900 (Fri, 01 Feb 2019) New Revision: 66973 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66973 Log: Run r66972 assertion only when a sticky-bit makes sense Modified files: trunk/test/fileutils/test_fileutils.rb Index: test/fileutils/test_fileutils.rb =================================================================== --- test/fileutils/test_fileutils.rb (revision 66972) +++ test/fileutils/test_fileutils.rb (revision 66973) @@ -742,13 +742,14 @@ class TestFileUtils < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/fileutils/test_fileutils.rb#L742 assert_file_not_exist 'tmp/tmpdir/c' File.chmod(01777, 'tmp/tmpdir') - Dir.mkdir 'tmp/tmpdir/d', 0 - assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'} - File.chmod 0777, 'tmp/tmpdir/d' - Dir.rmdir 'tmp/tmpdir/d' + if File.sticky?('tmp/tmpdir') + Dir.mkdir 'tmp/tmpdir/d', 0 + assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'} + File.chmod 0777, 'tmp/tmpdir/d' + Dir.rmdir 'tmp/tmpdir/d' + end Dir.rmdir 'tmp/tmpdir' - end def test_remove_entry_secure_symlink -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/