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 1bf1480a2f..53ab4c83a6 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 920a78c548..e3f52ef5ed 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 25e5371048..488b37a9a5 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 |