summaryrefslogtreecommitdiff
path: root/lib/cgi/session.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-06 03:05:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-06 03:05:23 +0000
commitf33a61c28dadf8ff2bb86d36d6428f487b671708 (patch)
tree6794731dfe7e2d526808376060893846f2ddc6c2 /lib/cgi/session.rb
parent439b453e3aa244e7b824a55aa11768dca3d4a6f4 (diff)
downloadruby-f33a61c28dadf8ff2bb86d36d6428f487b671708.tar.gz
* string.c (rb_str_lstrip_bang): new method.
* string.c (rb_str_rstrip_bang): new method. * string.c (rb_str_associate): should consider STR_ASSOC too. * eval.c (rb_undefined): do not recurse if method_missing is undefined. * process.c (proc_waitpid): now all arguments are optional. * process.c (Init_process): waitpid is now alias to wait. * process.c (Init_process): waitpid2 is now alias to wait2. * process.c (rb_waitpid): made public. * ext/pty/pty.c (pty_getpty): avoid disturbing SIGCHLD using thread and rb_waitpid. * process.c (proc_getpgrp): now takes no argument on all platforms. * process.c (proc_setpgrp): ditto. * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::pack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::pack_sockaddr_un(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_in): added Socket::unpack_sockaddr_in(). [new] * ext/socket/socket.c (sock_s_pack_sockaddr_un): added Socket::unpack_sockaddr_un(). [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi/session.rb')
-rw-r--r--lib/cgi/session.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 9187dbf82d..23c9bdc2a4 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -12,7 +12,7 @@ class CGI
def Session::callback(dbman)
lambda{
- dbman.close
+ dbman[0].close unless dbman.empty?
}
end
@@ -63,7 +63,8 @@ class CGI
end)
]
end
- ObjectSpace::define_finalizer(self, Session::callback(@dbman))
+ @dbprot = [@dbman]
+ ObjectSpace::define_finalizer(self, Session::callback(@dbprot))
end
def [](key)
@@ -89,10 +90,12 @@ class CGI
def close
@dbman.close
+ @dbprot.clear
end
def delete
@dbman.delete
+ @dbprot.clear
end
class FileStore