From: Ged Byrne Date: 2003-08-18T21:50:57+09:00 Subject: Re: @@newimpl and @newimpl in Net So @implVersion is an entirely different variable to @@implVersion. In Net/HTTP @implVersion is only assigned in one place: def HTTP.setimplversion( obj ) f = @@newimpl obj.instance_eval { @newimpl = f } end I cannot find anywhere in the code that is calling .setimplversion, yet changing the declaration of @@newimpl is reflected in @newimpl. Could anybody explain how this is working? > The big difference is that all instances of one > class > share the same class variable, but have their own > individual > instance variable. > > If you change a class variable, it will change > for all instances of that class. > > If you change an instance variable, only the > instance variable > of one specific instance will change and not for all > the other instances. > > bye, -A. ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/