summaryrefslogtreecommitdiff
path: root/lib/cgi/session.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/session.rb')
-rw-r--r--lib/cgi/session.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 9306508..ae4fb19 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -3,6 +3,7 @@
# Copyright (C) 2000 Information-technology Promotion Agency, Japan
require 'cgi'
+require 'tmpdir'
class CGI
class Session
@@ -109,7 +110,7 @@ class CGI
end
def initialize(session, option={})
- dir = option['tmpdir'] || ENV['TMP'] || '/tmp'
+ dir = option['tmpdir'] || Dir::TMPDIR
prefix = option['prefix'] || ''
id = session.session_id
unless check_id(id)