mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/dbm/dbm.c (fdbm_closed): new method DBM#closed?
* ext/gdbm/gdbm.c (fgdbm_closed): new method GDBM#closed? * ext/sdbm/init.c (fsdbm_closed): new method SDBM#closed? * test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/sdbm/test_sdbm.rb (teardown): close all db objects before deleting data files. * win32/win32.{ch} (unlink): hook runtime function to change file attribute before unlinking. merge from 1.8, see [ruby-dev:26360] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7946d2357a
commit
b03649bc2a
9 changed files with 95 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue