summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2021-04-23 13:59:16 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2021-05-11 12:04:27 -0700
commit08de37f9fa3469365e6b5c964689ae2bae0eb9f3 (patch)
tree21b0b6cd2ae3e878bbf0a6dc3f51dce8415c5327 /class.c
parente8ae922b62adb00a80d3d4c49f7d7b0e6026eaba (diff)
downloadruby-08de37f9fa3469365e6b5c964689ae2bae0eb9f3.tar.gz
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.
Diffstat (limited to 'class.c')
-rw-r--r--class.c1
1 files changed, 1 insertions, 0 deletions
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);