mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
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:
parent
8120971932
commit
8b5ac5abf2
Notes:
git
2025-06-12 11:43:42 +00:00
8 changed files with 71 additions and 41 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue