From: patrick-may@... (Patrick May) Date: 2002-02-21T01:38:58+09:00 Subject: Re: CGI::Session problems > --8<---- > CGI::Session does not work. > > On mod_ruby, CGI::Session is not closed automatically, so you should close it > explicitly.session = CGI::Session.new(...) > begin > ... > ensure > session.close > end > > This problem is not CGI::Session specific. You should close files etc too. > ---->8-- A while ago, I had an API suggestion to reduce errors of this type: http://groups.google.com/groups?q=SessionCGI&hl=en&selm=3b3ad3b4.0111281533.3f8687df%40posting.google.com&rnum=1 (sorry, I don't remember how to get the rubytalk number at this moment) It is possible to add the parameters for the CGI::Session constructer to CGI constructer without breaking any code for CGI. Then you get: cgi.out { |session| "output #{ session['name'] }" } which seems like the simple, expected thing for me. ~ Patrick May