1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

pstore abort handle

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-06-13 09:04:40 +00:00
parent 50cb050bd7
commit 97f8593cf8

View file

@ -88,14 +88,14 @@ class PStore
file = File::open(@filename, "r+")
orig = true
else
@table = {}
file = File::open(@filename, "w+")
Marshal::dump(@table, file)
end
file.flock(File::LOCK_EX)
if orig
File::copy @filename, backup
@table = Marshal::load(file)
else
@table = {}
end
begin
catch(:pstore_abort_transaction) do