On 10.5.2005, at 07:54, Martin DeMello wrote: > Ilmari Heikkinen <kig / misfiring.net> wrote: >> I quite like this, but wonder if it works with inheritance? > > This is actually my primary use case for class variables (@@var) - > inheriting configuration defaults down a class tree. > > martin > The problem with class vars is that changing them in the subclass affects the superclass aswell. class A @@foo = "A" def foo; @@foo; end end class B < A @@foo = "B" end A.new.foo => "B"