* lib/fileutils.rb: enable to remove with non-owner directory.

[ruby-dev:45976] [Bug #6756]
* test/fileutils/test_fileutils.rb: add testcase for #6756.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-08-12 04:36:31 +00:00
Родитель d1075b72c8
Коммит ac210750df
3 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Tue Aug 12 13:34:25 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* lib/fileutils.rb: enable to remove with non-owner directory.
[ruby-dev:45976] [Bug #6756]
* test/fileutils/test_fileutils.rb: add testcase for #6756.
Tue Aug 12 12:57:28 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> Tue Aug 12 12:57:28 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* vm_exec.c: improve performance in ppc64 arch. * vm_exec.c: improve performance in ppc64 arch.

Просмотреть файл

@ -1489,6 +1489,7 @@ module FileUtils
end end
end end
end end
ensure
yield self yield self
end end

Просмотреть файл

@ -1499,6 +1499,14 @@ class TestFileUtils < Test::Unit::TestCase
def test_rm_rf def test_rm_rf
check_singleton :rm_rf check_singleton :rm_rf
return if /mswin|mingw/ =~ RUBY_PLATFORM
mkdir 'tmpdatadir'
chmod 700, 'tmpdatadir'
rm_rf 'tmpdatadir'
assert_file_not_exist 'tmpdatadir'
end end
def test_rmdir def test_rmdir