From: Gary Wright Date: 2007-05-01T12:10:34+09:00 Subject: Re: Class Level Variables On Apr 30, 2007, at 9:32 PM, German Monfort wrote: > OK, I now understand the difference. > > Probably I'm too new to programming to understand the full power of > class > variables, and I found this concept a little bit dangerous because > you can > affect the whole behavior of a class by simply changing a class > variable in > any other subclass ... so I try not to use class variables for noiw. Well Ruby's class variables are unusual in their semantics, even veteran programmers get confused by them. The usual recommendation is to use 'class instance variables' when you want to have state associated with a particular class object (vs. a class hierarchy.) The easiest way to do that is to create attributes via the singleton class: class A class <