Fix class instance variable inside namespaces

Now that classes fields are delegated to an object with its own
shape_id, we no longer need to mark all classes as TOO_COMPLEX.
This commit is contained in:
Jean Boussier 2025-06-12 12:02:56 +02:00
parent 8120971932
commit 8b5ac5abf2
Notes: git 2025-06-12 11:43:42 +00:00
8 changed files with 71 additions and 41 deletions

View file

@ -450,9 +450,6 @@ namespace_initialize(VALUE namespace)
// If a code in the namespace adds a constant, the constant will be visible even from root/main.
RCLASS_SET_PRIME_CLASSEXT_WRITABLE(namespace, true);
// fallback to ivptr for ivars from shapes to manipulate the constant table
rb_evict_ivars_to_hash(namespace);
// Get a clean constant table of Object even by writable one
// because ns was just created, so it has not touched any constants yet.
object_classext = RCLASS_EXT_WRITABLE_IN_NS(rb_cObject, ns);