From 12bec49093666b9350f566f50339144d5f92e9e5 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 19 Nov 2004 16:59:11 +0000 Subject: * string.c (str_gsub): internal buffer should not be listed by ObjectSpace.each_object() by String#gsub. [ruby-dev:24931] * lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise exception if data corresponding to session specified from the client does not exist. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi/session/pstore.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/cgi/session') diff --git a/lib/cgi/session/pstore.rb b/lib/cgi/session/pstore.rb index e2727b5c5..40d2214c2 100644 --- a/lib/cgi/session/pstore.rb +++ b/lib/cgi/session/pstore.rb @@ -61,7 +61,10 @@ class CGI md5 = Digest::MD5.hexdigest(id)[0,16] path = dir+"/"+prefix+md5 path.untaint - unless File::exist? path + unless File::exist?(path) + unless session.new_session + raise RuntimeError, "uninitialized session" + end @hash = {} end @p = ::PStore.new(path) -- cgit