From: ts Date: 2006-05-11T02:05:03+09:00 Subject: Re: class << my_instance and class variables >>>>> "R" == Raphael Bauduin writes: R> So methods are added to the object specific class (the metaclass as R> identified in why's article), but class variables are added to the R> class of which the object is an instance. Well, no. class variables (i.e @@) are added in the class which is cuurently in scope. R> Further on this, if I defined a second instance and try to call test: R> b=A.new(6) R> b.test When you do this, ruby find the method Kernel#test which is a private method. This is why it give a warning. R> so it seems it was added to A, but marked as private. No, it was added to the singleton class of `a', you have just chosen a bad name for your method (test) :-) R> Oh, and about my initial question: how bad is the warning I get? ruby is trying to say that the variable @@v will be defined in Object, because there is no other class where it can define it. Guy Decoux