remove_method(*args)
private
Removes the method identified by symbol from the current class.
For an example, see Module.undef_method. String
arguments are converted to symbols.
Show source
static VALUE
rb_mod_remove_method(int argc, VALUE *argv, VALUE mod)
{
int i;
for (i = 0; i < argc; i++) {
VALUE v = argv[i];
ID id = rb_check_id(&v);
if (!id) {
rb_name_error_str(v, "method `%s' not defined in %s",
RSTRING_PTR(v), rb_class2name(mod));
}
remove_method(mod, id);
}
return mod;
}