diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 295fbfd960..5f1cc41e3a 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -123,7 +123,9 @@ class TestFileUtils < Test::Unit::TestCase def my_rm_rf(path) if File.exist?('/bin/rm') - system %Q[/bin/rm -rf "#{path}"] + system "/bin/rm", "-rf", path + elsif /mswin|mingw/ =~ RUBY_PLATFORM + system "rmdir", "/q/s", path.gsub('/', '\\'), err: IO::NULL else FileUtils.rm_rf path end