mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Applied gc patch to fix ORIGIN ICLASS method table leak
Based on the gc patch by ko1 https://github.com/ruby/ruby/commit/5922c954614e5947a548780bb3b894626affe6dd
This commit is contained in:
@@ -856,6 +856,7 @@ mrb_prepend_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
|
||||
origin = c->origin;
|
||||
if (origin == c) {
|
||||
origin = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_ICLASS, c);
|
||||
origin->flags |= MRB_FLAG_IS_ORIGIN;
|
||||
origin->origin = origin;
|
||||
origin->super = c->super;
|
||||
c->super = origin;
|
||||
|
||||
Reference in New Issue
Block a user