summaryrefslogtreecommitdiff
path: root/lib/pstore.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-24 07:59:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-24 07:59:02 +0000
commit05b4ec8683884ac9bd6ccde53e351ffe6562dc3d (patch)
tree8c7573b130066f797c9cfe663868a6d0df69e8fa /lib/pstore.rb
parent9020b60483daf3712fde61e8b07e3eadb85a4bee (diff)
* parse.y (yylex): __END__ should not be effective within
string literals. * parse.y (here_document): should be aware of __END__ within here documents. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pstore.rb')
-rw-r--r--lib/pstore.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 4a3434b283..23b2d878a3 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -95,8 +95,7 @@ class PStore
file.flock(read_only ? File::LOCK_SH : File::LOCK_EX)
if read_only
@table = Marshal::load(file)
- elsif orig
- content = file.read
+ elsif orig and (content = file.read) != nil
@table = Marshal::load(content)
size = content.size
md5 = Digest::MD5.digest(content)