From: Gavin Sinclair Date: 2004-05-13T15:45:16+09:00 Subject: Re: Proposal: Object#send(nil) -> self Hal wrote: >>>Perhaps ... see http://rcrchive.net/rcr/RCR/RCR249 >> >> >> Just looked (and voted in favour) assuming that what >> your requesting is Object#to_self. >> >> I just re-read the thread and didn't see that suggested >> anywhere. >> >> If you resubmitted with the more ruby-like name, >> it might be more obvious that your request is reasonable. >> >> Even more strongly, I wonder why it's not in Ruby now. > > I'm not entirely sure I see a need for it, but I don't > object to it. > > As for the name, personally I don't see that "self" would > conflict anywhere. You wouldn't be calling it from within > the object's methods, and if you did, well... you would > just get the "self" we have always had. > > "self" with a receiver, obj.self, does not currently have > any meaning I'm aware of. So, given this: class Object def self self end end Would the marked line below be using the method 'self' or the special variable 'self'? class X def foo self.bar # This one. end def bar 5 end end Furthermore, is the definition of Object#self above recursive? ;) Gavin