summaryrefslogtreecommitdiff
path: root/lib/pstore.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-27 09:16:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-27 09:16:20 +0000
commit55ec8ed2958a8159777157f7a4f91210279fe548 (patch)
tree49ef99e2eb178bd48e8ca50db077267c13f1b3c5 /lib/pstore.rb
parentece87af00c6e31181b7092980a351929c5421a43 (diff)
* gc.c (gc_sweep): recover ruby_in_compile variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pstore.rb')
-rw-r--r--lib/pstore.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 50313dc..51cef6e 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -104,10 +104,14 @@ class PStore
commit_new(file) if FileTest.exist?(new_file)
content = file.read()
else
- file = File.open(@filename, File::RDONLY)
- file.binmode
- file.flock(File::LOCK_SH)
- content = (File.read(new_file) rescue file.read())
+ begin
+ file = File.open(@filename, File::RDONLY)
+ file.binmode
+ file.flock(File::LOCK_SH)
+ content = (File.read(new_file) rescue file.read())
+ rescue Errno::ENOENT
+ content = ""
+ end
end
if content != ""