From: herman_graal@... Date: 2001-12-12T01:30:35+09:00 Subject: [ruby-talk:28239] Class vars overridden in subclasses? Hi, Ruby looks like a very fun language. However, I can't understand why the super class is affected in the code below: class Super @@a = 1 def m @@a end end class Sub < Super @@a = 2 def m @@a end end p Sub.new.m # gives 2 which is ok p Super.new.m # gives 2 which I don't understand Can someone help me? Regards, Herman -- _______________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup 1 cent a minute calls anywhere in the U.S.! http://www.getpennytalk.com/cgi-bin/adforward.cgi?p_key=RG9853KJ&url=http://www.getpennytalk.com