Skip to content

Commit

Permalink
Remove module only methods from class
Browse files Browse the repository at this point in the history
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 cc52fa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit cc52fa6

Please sign in to comment.