mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +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
2
shape.c
2
shape.c
|
@ -397,7 +397,7 @@ rb_obj_shape_id(VALUE obj)
|
|||
}
|
||||
|
||||
if (BUILTIN_TYPE(obj) == T_CLASS || BUILTIN_TYPE(obj) == T_MODULE) {
|
||||
VALUE fields_obj = RCLASS_FIELDS_OBJ(obj);
|
||||
VALUE fields_obj = RCLASS_WRITABLE_FIELDS_OBJ(obj);
|
||||
if (fields_obj) {
|
||||
return RBASIC_SHAPE_ID(fields_obj);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue