Ryan Pavlik <rpav / nwlink.com> wrote in message news:<20030510194422.13279d29.rpav / nwlink.com>...
> On Sun, 11 May 2003 11:30:22 +0900
> elbows / spamcop.net (Nathan Weston) wrote:
> 
> > In ruby 1.6.8, overriding class variables cause weird (to me at least)
> > results:
> > 
> > class Foo
> >   Const = 0
> > 
> <snip>
> 
> That's not a class variable.  You want @@const or something... although
> a class variable isn't a const.  OTOH, you're changing it, so you don't
> want a const, either. ;-)
> 
> Use @@var.  It acts like you want.

Oops, I forgot about @@var. However, that still doesn't do what I
want. As another poster pointed out, changing @@var in the subclass
changes it for the superclasses. Which is even more weird -- it means
the behavior of a class can be changed simply by defining a subclass
of it. If that is intentional, it seems like a rather odd design
choice.

Nathan