mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Module#dup should copy class methods as well
This commit is contained in:
@@ -64,6 +64,7 @@ struct RClass *mrb_vm_define_module(mrb_state*, mrb_value, mrb_sym);
|
||||
void mrb_define_method_vm(mrb_state*, struct RClass*, mrb_sym, mrb_value);
|
||||
void mrb_define_method_raw(mrb_state*, struct RClass*, mrb_sym, struct RProc *);
|
||||
void mrb_define_method_id(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_func_t func, int aspec);
|
||||
void mrb_alias_method(mrb_state *mrb, struct RClass *c, mrb_sym a, mrb_sym b);
|
||||
|
||||
struct RClass *mrb_class_outer_module(mrb_state*, struct RClass *);
|
||||
struct RProc *mrb_method_search_vm(mrb_state*, struct RClass**, mrb_sym);
|
||||
|
||||
@@ -1117,4 +1117,5 @@ mrb_init_kernel(mrb_state *mrb)
|
||||
#endif
|
||||
|
||||
mrb_include_module(mrb, mrb->object_class, mrb->kernel_module);
|
||||
mrb_alias_method(mrb, mrb->module_class, mrb_intern(mrb, "dup"), mrb_intern(mrb, "clone"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user