diff options
author | Jean Boussier <byroot@ruby-lang.org> | 2024-04-16 15:30:00 +0200 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2024-04-16 17:20:35 +0200 |
commit | f06670c5a2a1daa6595018858d5cfa429a8aeae6 (patch) | |
tree | f41c57d0089600f9faf5379d61d0aad6fbbaadee /complex.c | |
parent | 7380e3d30ff3d33fa7dd3756929e5718be665bba (diff) |
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.
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -397,7 +397,7 @@ nucomp_s_new_internal(VALUE klass, VALUE real, VALUE imag) RCOMPLEX_SET_REAL(obj, real); RCOMPLEX_SET_IMAG(obj, imag); - OBJ_FREEZE_RAW((VALUE)obj); + OBJ_FREEZE((VALUE)obj); return (VALUE)obj; } @@ -1717,7 +1717,7 @@ nucomp_loader(VALUE self, VALUE a) RCOMPLEX_SET_REAL(dat, rb_ivar_get(a, id_i_real)); RCOMPLEX_SET_IMAG(dat, rb_ivar_get(a, id_i_imag)); - OBJ_FREEZE_RAW(self); + OBJ_FREEZE(self); return self; } |