mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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:
parent
b51078f82e
commit
6dbe24fe56
Notes:
git
2025-06-13 21:50:44 +00:00
9 changed files with 54 additions and 51 deletions
4
object.c
4
object.c
|
@ -373,9 +373,9 @@ init_copy(VALUE dest, VALUE obj)
|
|||
if (OBJ_FROZEN(dest)) {
|
||||
rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest));
|
||||
}
|
||||
RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
|
||||
RBASIC(dest)->flags &= ~T_MASK;
|
||||
// Copies the shape id from obj to dest
|
||||
RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR);
|
||||
RBASIC(dest)->flags |= RBASIC(obj)->flags & T_MASK;
|
||||
switch (BUILTIN_TYPE(obj)) {
|
||||
case T_IMEMO:
|
||||
rb_bug("Unreacheable");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue