From: Alexander Trauzzi Date: 2009-06-23T04:22:34+09:00 Subject: Re: Some confusion on self and the like.... Robert Klemme wrote: > On 22.06.2009 18:46, David A. Black wrote: > >>> Moreover, how do I get the furthest-down-the-inheritance-chain name of >>> the currently running instance? >> >> I'm not sure what you mean. The class of self? (Which would be >> self.class.) > > It seems Alexander is asking for "self.class". Alex, you can even try > "p self.class.ancestors" to see the full inheritance chain (including > modules). > > Kind regards > > robert Indeed. It was recently implemented in PHP as "late static binding" (as "self" references the class in which it is used, as opposed to the context during the invocation itself). From what I'm reading here, "ruby does it right"(tm?) ;) Thanks for all your help guys, I will follow up in a new topic if I have any further questions. -- Posted via http://www.ruby-forum.com/.