summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-10-21 16:24:29 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2022-10-21 14:57:34 -0700
commita11952dac1a5b0776a493968eeffbd4be4403b76 (patch)
treeb905121c4e4ac94010def14957da6539ce0dd2d5 /gc.c
parent13bd617ea6fdf72467c593639cf33312a06c330c (diff)
Rename `iv_count` on shapes to `next_iv_index`
`iv_count` is a misleading name because when IVs are unset, the new shape doesn't decrement this value. `next_iv_count` is an accurate, and more descriptive name.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6608
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index cc7b338062..b8c4bfb009 100644
--- a/gc.c
+++ b/gc.c
@@ -3434,7 +3434,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
VALUE klass = RBASIC_CLASS(obj);
// Increment max_iv_count if applicable, used to determine size pool allocation
- uint32_t num_of_ivs = shape->iv_count;
+ uint32_t num_of_ivs = shape->next_iv_index;
if (RCLASS_EXT(klass)->max_iv_count < num_of_ivs) {
RCLASS_EXT(klass)->max_iv_count = num_of_ivs;
}