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:
Corey Powell
2015-07-14 09:44:04 -05:00
parent f0e920baf0
commit eb172c28d7
4 changed files with 18 additions and 4 deletions
+1
View File
@@ -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;