"Peter" <Peter.Vanbroekhoven / cs.kuleuven.ac.be> wrote in message
news:Pine.LNX.4.61.0412060934560.20968 / merlin.cs.kuleuven.ac.be...
> > A Method still isn't good, because you can't easily get the name of
> > the Method without calling #inspect.
>
> You're right, the Ruby programmer can't get at the name of the method not
> the class it is defined in. Inside the Ruby core it is of course very
> easy. There are no (Unbound)?Method#(name|class), probably because there
> was no use for them, but is there another reason against adding these
> methods?

I would like to see the following navigations at the Ruby level (unless
there is really some good reason to disallow them):

- (bound)Method -> the object it is bound to
- (bound)Method -> its UnboundMethod
- UnboundMethod -> its class (possibly singleton class)
- UnboundMethod -> its name (by which it is referred to from its class)

I am interested in reasons, if any, why these should not be available.