On Monday 30 November 2009 04:18:06 am Paul Smith wrote: > > Also, if you haven't seen this before, don't let it frighten you: > > > > @count ||= 0 > > > > That's providing a default value for @count. When you execute that code, > > it checks whether @count has a positive value -- if it doesn't, it > > assigns 0 to @count. Either way, the (possibly new) value of @count will > > be returned. > > Does it? I thought this would only give @count the value 0 if it > previously had the value nil or false, and that if the count was -7 > that would remain. Did you mean "@count has a true value" instead of > "@count has a positive value"? Whoops, yes, I did. You're right.