static VALUE
method_clone(VALUE self)
{
VALUE clone;
struct METHOD *orig, *data;
TypedData_Get_Struct(self, struct METHOD, &method_data_type, orig);
clone = TypedData_Make_Struct(CLASS_OF(self), struct METHOD, &method_data_type, data);
CLONESETUP(clone, self);
*data = *orig;
data->me = ALLOC(rb_method_entry_t);
*data->me = *orig->me;
if (data->me->def) data->me->def->alias_count++;
data->ume = ALLOC(struct unlinked_method_entry_list_entry);
return clone;
}