[Nitro] cookie.rb ?
akonsu at gmail.com
Tue Nov 15 17:50:32 EST 2005
yes, the expression seems to assign nil to @expires in case 't' is
nil. i think that it is not the same as having an 'if' as Guillaume
wrote. so, does it look like a bug?
2005/11/15, Aleksi Niemela <Aleksi.Niemela at cs.helsinki.fi>:
> guillaume pierronnet wrote:
> >this is a boolean "and"
> >this expression is equivalent:
> >if t
> > @expires = t.is_a?(Time) ? t.httpdate : t.to_s
> Sure but as you can see it's a bit hard to reset expiration by assigning
> nil. Haven't read the code to see if there's other way around. In case
> nil is not expected value of the parameter checking it instead of
> failing through raising an exception is not common way in Ruby world.
> Then again, this is Nitro-world where plenty of things work under plenty
> of useful assumptions making coding much easier.
> - Aleksi
> Nitro-general mailing list
> Nitro-general at rubyforge.org
More information about the Nitro-general