From: Justin White Date: 2003-01-23T16:05:24+09:00 Subject: Re: POLS (with one case: "class variable") On Wednesday, January 22, 2003, at 08:26 , David Garamond wrote: > Justin White wrote: >> i'm guessing from those names, that your surprise is that class >> variables get inherited... >> why is this surprising? class methods get inherited, why shouldn't >> class variables? > > i'm mostly concerned with terminology. when people wants "class > variable", they actually want "instance variable of class" in ruby. which do you want, instance variables or class variables? they're both inherited by subclasses, just as both kinds of methods are. there is only one instance of each _class definition_, and hence only one instance of class variables and class methods. unless you redefine them in the subclass, the ascentor's class methods will be used. > -- dave >