From 08de37f9fa3469365e6b5c964689ae2bae0eb9f3 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Fri, 23 Apr 2021 13:59:16 -0400 Subject: Filling cache values on cvar write Instead of on read. Once it's in the inline cache we never have to make one again. We want to eventually put the value into the cache, and the best opportunity to do that is when you write the value. --- class.c | 1 + 1 file changed, 1 insertion(+) (limited to 'class.c') diff --git a/class.c b/class.c index 07235b80d2..ef3db6dab3 100644 --- a/class.c +++ b/class.c @@ -960,6 +960,7 @@ rb_include_class_new(VALUE module, VALUE super) RCLASS_CONST_TBL(module) = rb_id_table_create(0); } RCLASS_IV_TBL(klass) = RCLASS_IV_TBL(module); + RCLASS_CVC_TBL(klass) = RCLASS_CVC_TBL(module); RCLASS_CONST_TBL(klass) = RCLASS_CONST_TBL(module); RCLASS_SET_SUPER(klass, super); -- cgit v1.2.1