Use the shape_id rather than FL_EXIVAR

We still keep setting `FL_EXIVAR` so that `rb_shape_verify_consistency`
can detect discrepancies.
This commit is contained in:
Jean Boussier 2025-06-13 15:49:17 +02:00
parent b51078f82e
commit 6dbe24fe56
Notes: git 2025-06-13 21:50:44 +00:00
9 changed files with 54 additions and 51 deletions

View file

@ -1267,10 +1267,10 @@ rb_shape_verify_consistency(VALUE obj, shape_id_t shape_id)
}
if (FL_TEST_RAW(obj, FL_EXIVAR)) {
RUBY_ASSERT(rb_obj_has_exivar(obj));
RUBY_ASSERT(rb_obj_exivar_p(obj));
}
else {
RUBY_ASSERT(!rb_obj_has_exivar(obj));
RUBY_ASSERT(!rb_obj_exivar_p(obj));
}
return true;