From: dblack@... Date: 2007-01-21T04:26:44+09:00 Subject: Re: Minor Change Proposal for Classes 'Object' and 'Method' Hi -- On Sun, 21 Jan 2007, gwtmp01@mac.com wrote: > > On Jan 20, 2007, at 1:38 PM, dblack@wobblini.net wrote: >> I'm not quite understanding the idea of meth.receiver, though. How >> does that fit in with the idea of the receiver being whatever object a >> given message is sent to (which could, in most cases, be any of many >> objects)? > > We are talking about the information encapsulated in an instance > of Method, which currently isn't accessible via introspection (unless > you want to get creative and parse the output of the inspect string). > > a = [1,2] > m1 = a.method('first') > > m1.receiver # a, i.e. [1, 2] I guess I find that a bit anomalous because it's calling a the "receiver" of a message it may or may not ever have received. I'm not sure what a better term is, though. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)