summaryrefslogtreecommitdiffstats
path: root/lib
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
commit95924d795013222339aa201ec5f9a508660f8e83 (patch)
tree8c7573b130066f797c9cfe663868a6d0df69e8fa /lib
parent547ad0098b092407a6234f765099dca536137ef8 (diff)
downloadruby-95924d795013222339aa201ec5f9a508660f8e83.tar.gz
ruby-95924d795013222339aa201ec5f9a508660f8e83.tar.xz
ruby-95924d795013222339aa201ec5f9a508660f8e83.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@2592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/pstore.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 4a3434b28..23b2d878a 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)