summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-04-16 15:30:00 +0200
committerJean Boussier <[email protected]>2024-04-16 17:20:35 +0200
commitf06670c5a2a1daa6595018858d5cfa429a8aeae6 (patch)
treef41c57d0089600f9faf5379d61d0aad6fbbaadee /ruby.c
parent7380e3d30ff3d33fa7dd3756929e5718be665bba (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 'ruby.c')
-rw-r--r--ruby.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ruby.c b/ruby.c
index fb60551c3f..e939320f1f 100644
--- a/ruby.c
+++ b/ruby.c
@@ -706,11 +706,11 @@ ruby_init_loadpath(void)
p -= bindir_len;
archlibdir = rb_str_subseq(sopath, 0, p - libpath);
rb_str_cat_cstr(archlibdir, libdir);
- OBJ_FREEZE_RAW(archlibdir);
+ OBJ_FREEZE(archlibdir);
}
else if (p - libpath >= libdir_len && !strncmp(p - libdir_len, libdir, libdir_len)) {
archlibdir = rb_str_subseq(sopath, 0, (p2 ? p2 : p) - libpath);
- OBJ_FREEZE_RAW(archlibdir);
+ OBJ_FREEZE(archlibdir);
p -= libdir_len;
}
#ifdef ENABLE_MULTIARCH
@@ -741,7 +741,7 @@ ruby_init_loadpath(void)
#endif
rb_gc_register_address(&ruby_prefix_path);
ruby_prefix_path = PREFIX_PATH();
- OBJ_FREEZE_RAW(ruby_prefix_path);
+ OBJ_FREEZE(ruby_prefix_path);
if (!archlibdir) archlibdir = ruby_prefix_path;
rb_gc_register_address(&ruby_archlibdir_path);
ruby_archlibdir_path = archlibdir;