Eliminate usage of OBJ_FREEZE_RAW

Previously it would bypass the `FL_ABLE` check, but
since shapes introduction, it started having a different
behavior than `OBJ_FREEZE`, as it would onyl set the `FL_FREEZE`
flag, but not update the shape.

I have no indication of this causing a bug yet, but it seems
like a trap waiting to happen.
This commit is contained in:
Jean Boussier 2024-04-16 15:30:00 +02:00 committed by Jean Boussier
parent 7380e3d30f
commit f06670c5a2
9 changed files with 22 additions and 22 deletions

View file

@ -2273,7 +2273,7 @@ rb_freeze_singleton_class(VALUE x)
VALUE klass = RBASIC_CLASS(x);
if (klass && // no class when hidden from ObjectSpace
FL_TEST(klass, (FL_SINGLETON|FL_FREEZE)) == FL_SINGLETON) {
OBJ_FREEZE_RAW(klass);
OBJ_FREEZE(klass);
}
}
}