diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/dbm/test_dbm.rb | 4 | ||||
-rw-r--r-- | test/gdbm/test_gdbm.rb | 4 | ||||
-rw-r--r-- | test/sdbm/test_sdbm.rb | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/test/dbm/test_dbm.rb b/test/dbm/test_dbm.rb index f089d63b6f..a5e2c4f4a1 100644 --- a/test/dbm/test_dbm.rb +++ b/test/dbm/test_dbm.rb @@ -42,7 +42,9 @@ if defined? DBM def teardown assert_nil(@dbm.close) assert_nil(@dbm_rdonly.close) - GC.start + ObjectSpace.each_object(DBM) do |obj| + obj.close unless obj.closed? + end File.delete *Dir.glob("tmptest_dbm*").to_a p Dir.glob("tmptest_dbm*") if $DEBUG end diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb index 0b913e3a57..d2f3a945a0 100644 --- a/test/gdbm/test_gdbm.rb +++ b/test/gdbm/test_gdbm.rb @@ -39,7 +39,9 @@ if defined? GDBM def teardown assert_nil(@gdbm.close) assert_nil(@gdbm_rdonly.close) - GC.start + ObjectSpace.each_object(GDBM) do |obj| + obj.close unless obj.closed? + end File.delete *Dir.glob("tmptest_gdbm*").to_a p Dir.glob("tmptest_gdbm*") if $DEBUG end diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 99450640b3..d94b5e94af 100644 --- a/test/sdbm/test_sdbm.rb +++ b/test/sdbm/test_sdbm.rb @@ -12,7 +12,9 @@ class TestSDBM < Test::Unit::TestCase end def teardown assert_nil(@sdbm.close) - GC.start + ObjectSpace.each_object(SDBM) do |obj| + obj.close unless obj.closed? + end File.delete *Dir.glob("tmptest_sdbm*").to_a p Dir.glob("tmptest_sdbm*") if $DEBUG end |