From: Rasputin Date: 2003-07-15T07:50:31+09:00 Subject: Re: Ruby CGI questions * Kurt M. Dresner [0712 22:12]: > I'm trying to make a game (or at least something, so I can learn) with > Ruby CGI. I'm having a really hard time with sessions. I have some > variables that I want to save, but they are not strings. They are > classes that I have defined. Is there any way to save them with a > session without them just being converted to strings and then being read > back in as strings when I load the session up? Here's what I have: Try cgi-session-PStore in RAA. Found it this afternoon.. > #! /usr/bin/env ruby > > require "cgi" > require "cgi/session" > require "setdeck" > require "set" > require "setcollection" > require "setboard" > > cgi = CGI.new("html4") > sess = CGI::Session.new( cgi, "session_key" => "crappyset", > "session_id" => "1234", #cgi.remote_addr, > "prefix" => "setgame.", > "tmpdir" => "/tmp") -- Only adults have difficulty with childproof caps. Rasputin :: Jack of All Trades - Master of Nuns