From: Rick DeNatale Date: 2008-05-12T00:04:06+09:00 Subject: Re: Sharing variables between classes and instances On Sun, May 11, 2008 at 10:09 AM, Albert Schlef wrote: > btw, you can simply do @@var to have a var that is shared among objects > of the same class. There be dragons! Class variables (@@var) in Ruby are also shared by subclasses (with some quirks in some cases such as when a superclass acquires a class variable AFTER one or more of its subclasses) and violate the expectations of almost everyone who tries to use them. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/