From: "David A. Black" Date: 2005-05-05T05:37:16+09:00 Subject: Re: [RCR] Object#inside_metaclass? Hi -- On Thu, 5 May 2005 Ara.T.Howard@noaa.gov wrote: > I wrote: >> >> So his concept of "inside a metaclass" includes "inside a non-class >> object's >> singleton class" (since top-level self is not a class). > > it does - but inadvertently. the only requirement i have is to determine > 'inside_metaclass?' as in > > class C > class << self > p inside_metaclass? # true > end > end > > the singleton meaning accreted itself into my impl in a moment of stupidity > ;-( > >> He then predicates that his code only works iff "all metaclasses descend >> from the metaclass of Object", but if he's using "metaclass" to mean the >> same thing he meant it to mean in "inside_metaclass?", then this means >> singleton class (and the statement is false). > > you are right. i didn't mean it - honest! my need to is to have context > sensitive class methods I believe you! :-) I just extrapolated from that one example and got us sidetracked. David -- David A. Black dblack@wobblini.net