From: Gregory Seidman Date: 2006-07-04T01:42:04+09:00 Subject: Re: About 1.9 #__method__ feature. On Tue, Jul 04, 2006 at 12:48:18AM +0900, ara.t.howard@noaa.gov wrote: [...] } maybe a meta-method to return all the info: } } # } # an array of objects representing call record } # } where = __where__ } } # } # the first record is the call we're in } # } p where[0].file #=> same as __FILE__ } p where[0].method #=> same as __method__ } p where[0].line #=> same as __LINE__ } p where[0].binding #=> same as binding } } # } # but this one reaches up like binding_of_caller } # } p where[1].file #=> same as __FILE__ } p where[1].method #=> same as __method__ } p where[1].line #=> same as __LINE__ } p where[1].binding #=> same as binding } } # } # and even further! } # } p where[2].file #=> same as __FILE__ } p where[2].method #=> same as __method__ } p where[2].line #=> same as __LINE__ } p where[2].binding #=> same as binding } } } basically i'm proposing a 'caller' like interface which returns an array } of objects having all the 'location' information, including } scope/binding. this could be amazingly useful. +1 I like that! } regards. } -a --Greg