diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-24 06:20:31 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-24 06:20:31 +0000 |
| commit | a97880f4f6ffe51b52946b0bcb6af44f0c598a42 (patch) | |
| tree | 7a5cb8f3c6ae80ad2f4066fb25c625fa8fe62aa5 /test/sdbm | |
| parent | cf519e11eee48454050026cbb023790d5ef5465b (diff) | |
| download | ruby-a97880f4f6ffe51b52946b0bcb6af44f0c598a42.tar.gz ruby-a97880f4f6ffe51b52946b0bcb6af44f0c598a42.tar.xz ruby-a97880f4f6ffe51b52946b0bcb6af44f0c598a42.zip | |
use Dir.mktmpdir.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/sdbm')
| -rw-r--r-- | test/sdbm/test_sdbm.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 832e41f4f..0badf7c4b 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) |
