summaryrefslogtreecommitdiff
path: root/test/dbm
diff options
context:
space:
mode:
Diffstat (limited to 'test/dbm')
-rw-r--r--test/dbm/test_dbm.rb4
1 files changed, 3 insertions, 1 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