summaryrefslogtreecommitdiff
path: root/test/sdbm/test_sdbm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/sdbm/test_sdbm.rb')
-rw-r--r--test/sdbm/test_sdbm.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb
index 99450640b31..d94b5e94afd 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