From: ara.t.howard@... Date: 2006-07-04T00:48:18+09:00 Subject: Re: About 1.9 #__method__ feature. On Tue, 4 Jul 2006, Yukihiro Matsumoto wrote: > In addition to __method__? H mm, maybe. I am not sure how much symmetry > buys us here. one less trip to the docs! ;-) stuff like that is hard to remember. > Since I don't like capitals in general, it's less chance to remove > __method__. I just used __FILE__ etc. for consistency with CPP. with you on both counts. 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. regards. -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama