diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-13 09:04:40 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-13 09:04:40 +0000 |
commit | 97f8593cf8af3b44e170fee5aca9b0a521cd3ffd (patch) | |
tree | 8c0bca56009d4375a740e7d62dcb38b5d70fcab3 /lib/pstore.rb | |
parent | 50cb050bd7fb61b0316eac608f69a29479b8fc60 (diff) |
pstore abort handle
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pstore.rb')
-rw-r--r-- | lib/pstore.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb index 05fa5dccc7..409fc6dfc0 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 |