From 462d4e12247f097123001227b1500a84519e41ed Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 24 Oct 2007 06:20:31 +0000 Subject: use Dir.mktmpdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/sdbm/test_sdbm.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/sdbm') diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 832e41f4fd..0badf7c4b7 100644 --- a/test/sdbm/test_sdbm.rb +++ b/test/sdbm/test_sdbm.rb @@ -8,7 +8,7 @@ end class TestSDBM < Test::Unit::TestCase def setup - @tmpdir = Dir.tmpdir + @tmpdir = Dir.mktmpdir("tmptest_sdbm") @prefix = "tmptest_sdbm_#{$$}" @path = "#{@tmpdir}/#{@prefix}_" assert_instance_of(SDBM, @sdbm = SDBM.new(@path)) @@ -18,8 +18,7 @@ class TestSDBM < Test::Unit::TestCase ObjectSpace.each_object(SDBM) do |obj| obj.close unless obj.closed? end - File.delete *Dir.glob("#{@tmpdir}/#{@prefix}*").to_a - p Dir.glob("#{@tmpdir}/#{@prefix}*") if $DEBUG + FileUtils.remove_entry_secure @tmpdir end def check_size(expect, sdbm=@sdbm) -- cgit v1.2.3