On 6/4/06, mic firstname.lastname@example.org wrote:
when i do this:
session[:myItem] = ‘foo’
session[:myItem] = nil
the item :myItem is removed from the session.
Are you sure about that? It shouldn’t be so, and some simple checks
with both debug(session) indicate it is not, exactly the same as for
the string key.
Moreover, note that even on a regular hash, setting key to value nil
would not eliminate the key. What the CGI::Session pseudo-hash
actually lacks is the Hash#delete method. Or rather, it has its own
#delete, which does something else which you probably don’t want
(destroy the session). Bad design decision for a pseudo-hash object,