summaryrefslogtreecommitdiffhomepage
path: root/src/gc.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-12-25 23:23:00 +0900
committerGitHub <[email protected]>2019-12-25 23:23:00 +0900
commitd6b898685f5e6efeb3b4cadac60237d3c26abc38 (patch)
treefb34f7702c2654160b4a34b639b147df2a116d91 /src/gc.c
parentd4cbe6271cc8343647fd0841bb549e1b7c804c34 (diff)
parent0b2d54f4f1d66a0b00625dcc634966d67c29b8b8 (diff)
downloadmruby-d6b898685f5e6efeb3b4cadac60237d3c26abc38.tar.gz
mruby-d6b898685f5e6efeb3b4cadac60237d3c26abc38.zip
Merge pull request #4907 from shuujii/fix-poteltially-use-of-wrong-method-cache
Fix potentially use of wrong method cache
Diffstat (limited to 'src/gc.c')
-rw-r--r--src/gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gc.c b/src/gc.c
index 40c85a373..8d9a1806c 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -807,10 +807,12 @@ obj_free(mrb_state *mrb, struct RBasic *obj, int end)
case MRB_TT_SCLASS:
mrb_gc_free_mt(mrb, (struct RClass*)obj);
mrb_gc_free_iv(mrb, (struct RObject*)obj);
+ mrb_mc_clear_by_class(mrb, (struct RClass*)obj);
break;
case MRB_TT_ICLASS:
if (MRB_FLAG_TEST(obj, MRB_FL_CLASS_IS_ORIGIN))
mrb_gc_free_mt(mrb, (struct RClass*)obj);
+ mrb_mc_clear_by_class(mrb, (struct RClass*)obj);
break;
case MRB_TT_ENV:
{