Fix Module#dup to frozen module

Before this patch:

  $ bin/mruby -e 'p Module.new.freeze.dup.frozen?'  #=> true

After this patch (same as Ruby):

  $ bin/mruby -e 'p Module.new.freeze.dup.frozen?'  #=> false
This commit is contained in:
KOBAYASHI Shuji
2019-07-20 22:39:48 +09:00
parent cf4cddf7a1
commit 7675fcb5d3
3 changed files with 32 additions and 1 deletions
-1
View File
@@ -805,5 +805,4 @@ mrb_init_kernel(mrb_state *mrb)
mrb_define_method(mrb, krn, "__to_str", mrb_to_str, MRB_ARGS_NONE()); /* internal */
mrb_include_module(mrb, mrb->object_class, mrb->kernel_module);
mrb_define_alias(mrb, mrb->module_class, "dup", "clone"); /* XXX */
}