Skip to content
Permalink
Browse files
Remove module only methods from class
The `#prepend_features` and `#module_function` methods are not haves for
class objects.
  • Loading branch information
dearblue committed Dec 14, 2019
1 parent 6c5ee8f commit cc52fa66e8c12be2b6bbe3c7fd850ea0b2beb0c1
Showing 1 changed file with 2 additions and 0 deletions.
@@ -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());

0 comments on commit cc52fa6

Please sign in to comment.