On Thu, Aug 07, 2003 at 11:18:17PM +0900, djd15 / cwru.edu wrote:
> As far as I know, there's nothing quite like C's static
> in Ruby, since there's no way to make a variable local
> in scope to a function, but persistant in state over all
> calls to that function (at least that I know of).

A C 'static' variable is just a global variable with a lexically local
scope, so a class variable (@@count += 1) is probably the closest
equivalent. The scope extends to the whole object though, not just the
method.

Regards,

Brian.