From: Austin Ziegler Date: 2004-12-06T23:48:39+09:00 Subject: Re: [ANN] patch to "make def return something useful" On Mon, 6 Dec 2004 17:44:03 +0900, Peter wrote: > > 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? Yes, but the whole point of having def return something useful is to make it easier for someone to use this information at the Ruby level, not at the Ruby core level. Returning a Method or UnboundMethod is, ultimately, useless for meta-programming. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca