summaryrefslogtreecommitdiff
path: root/lib/pstore.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-11 06:29:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-11 06:29:16 +0000
commit6c11709d4c2ca083d0c1f7c7041b5aec4efd9361 (patch)
tree5b16a6e87ee2915c89357e9f15b3d0b1a21b8d93 /lib/pstore.rb
parenta86f6a00df5c97e1e6c64d96e39e11e2df3d9053 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pstore.rb')
-rw-r--r--lib/pstore.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 5eadd68..b3e1df8 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -108,6 +108,7 @@ class PStore
begin
file.rewind
Marshal::dump(@table, file)
+ file.truncate(file.pos)
rescue
File::rename backup, @filename if File::exist?(backup)
raise