summaryrefslogtreecommitdiff
path: root/lib/cgi/session/pstore.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/session/pstore.rb')
-rw-r--r--lib/cgi/session/pstore.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/cgi/session/pstore.rb b/lib/cgi/session/pstore.rb
index 10f3e8f75f..e65a2a97db 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)