From cc52fa66e8c12be2b6bbe3c7fd850ea0b2beb0c1 Mon Sep 17 00:00:00 2001 From: dearblue Date: Sat, 14 Dec 2019 22:04:44 +0900 Subject: Remove module only methods from class The `#prepend_features` and `#module_function` methods are not haves for class objects. --- src/class.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/class.c b/src/class.c index e0196fe0a..0da572b0e 100644 --- a/src/class.c +++ b/src/class.c @@ -2323,7 +2323,9 @@ mrb_init_class(mrb_state *mrb) mrb_define_method(mrb, mod, "dup", mrb_mod_dup, MRB_ARGS_NONE()); mrb_undef_method(mrb, cls, "append_features"); + mrb_undef_method(mrb, cls, "prepend_features"); mrb_undef_method(mrb, cls, "extend_object"); + mrb_undef_method(mrb, cls, "module_function"); mrb->top_self = (struct RObject*)mrb_obj_alloc(mrb, MRB_TT_OBJECT, mrb->object_class); mrb_define_singleton_method(mrb, mrb->top_self, "inspect", inspect_main, MRB_ARGS_NONE()); -- cgit v1.2.3