From 771ffbb72480acd8dd12c2ac7df763b59aa1c383 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 22 Nov 2004 15:29:52 +0000 Subject: * file.c (rb_file_chown): integer conversion should be prior to GetOpenFile(). [ruby-dev:24947] * file.c (rb_file_truncate): ditto. * file.c (rb_file_s_truncate): ditto. * dir.c (dir_seek): use NUM2OFFT(). * misc/ruby-mode.el (ruby-non-block-do-re): [ruby-core:03719] * dir.c (dir_seek): should retrieve dir_data after NUM2INT(). [ruby-dev:24941] * string.c (rb_str_splice): should place index wrapping after possible modification. [ruby-dev:24940] * eval.c (error_print): nicer traceback at interrupt. [ruby-core:03774] * 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. * string.c (str_gsub): internal buffer should not be listed by ObjectSpace.each_object(). [ruby-dev:24919] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7354 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 10f3e8f75..e65a2a97d 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