summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-13 09:04:40 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-13 09:04:40 +0000
commit97f8593cf8af3b44e170fee5aca9b0a521cd3ffd (patch)
tree8c0bca56009d4375a740e7d62dcb38b5d70fcab3
parent50cb050bd7fb61b0316eac608f69a29479b8fc60 (diff)
pstore abort handle
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/pstore.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 05fa5dccc73..409fc6dfc01 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -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