/*
* call-seq:
* __method__ => symbol
* __callee__ => symbol
*
* Returns the name of the current method as a Symbol.
* If called outside of a method, it returns <code>nil</code>.
*
*/
static VALUE
rb_f_method_name(void)
{
ID fname = rb_frame_callee();
if (fname) {
return ID2SYM(fname);
}
else {
return Qnil;
}
}