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.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 8453501399..a44de7cb81 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -210,7 +210,7 @@ class CGI
#
# session_expires:: the time the current session expires, as a
# +Time+ object. If not set, the session will terminate
- # when the user's browser is closed.
+ # when the user's browser is closed.
# session_domain:: the hostname domain for which this session is valid.
# If not set, defaults to the hostname of the server.
# session_secure:: if +true+, this session will only work over HTTPS.
@@ -365,7 +365,6 @@ class CGI
raise ArgumentError, "session_id `%s' is invalid" % id
end
@path = dir+"/"+prefix+id
- @path.untaint
unless File::exist? @path
@hash = {}
end
@@ -413,7 +412,8 @@ class CGI
# Close and delete the session's FileStore file.
def delete
- File::unlink @path
+ File::unlink @path
+ rescue Errno::ENOENT
end
end