/*
* call-seq:
* meth.unbind => unbound_method
*
* Dissociates <i>meth</i> from it's current receiver. The resulting
* <code>UnboundMethod</code> can subsequently be bound to a new object
* of the same class (see <code>UnboundMethod</code>).
*/
static VALUE
method_unbind(VALUE obj)
{
VALUE method;
struct METHOD *orig, *data;
Data_Get_Struct(obj, struct METHOD, orig);
method =
Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free,
data);
data->oclass = orig->oclass;
data->recv = Qundef;
data->id = orig->id;
data->body = orig->body;
data->rclass = orig->rclass;
data->oid = orig->oid;
OBJ_INFECT(method, obj);
return method;
}