Hi --

On Tue, 23 Jan 2007, ara.t.howard / noaa.gov wrote:

> On Tue, 23 Jan 2007 dblack / wobblini.net wrote:
>
>> Hi --
>> 
>> On Tue, 23 Jan 2007, Yukihiro Matsumoto wrote:
>> 
>>> |I've also started thinking about the idea of a MethodData class... but
>>> |it's pretty unformulated.
>>> 
>>> Hmm, I am looking forward.
>> 
>> I can give you the very basic idea (and that will save me some further
>> trouble if you don't like it :-)
>>
>>  str = "abc"
>>  md = str.method_data(:split)   => MatchData object
>
> MatchData ??

Typo :-)

>>
>>  md.method                      => Method object
>>  md.receiver                    => str
>>  md.method_name                 => "split"
>> 
>
> why would the properties of an object be contained outside of the method
> object?  wouldn't it be more intuitive to do
>
>  m = 'pols'.method 'split'
>
>  p m.name     #=> 'split'
>  p m.receiver #=> 'pols'

Is that subliminal advertising? :-)

> it just seems more economic to hang this info off of the method object itself

We're back to square one -- see my various explanations of why I find
the term "receiver" inexact and confusing for this particular purpose.


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)