summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2025-01-29 14:00:23 -0500
committerPeter Zhu <[email protected]>2025-01-30 10:10:48 -0500
commit50327913303d3b821720476406190cbfb6382492 ()
treea0c6b34845164015f8a7b98104f555287db9b66e /vm.c
parenta084fef9afc7713aa4f4111f7e826c7ca1a607c7 (diff)
Fix conversion of RubyVM::FrozenCore to T_ICLASS
We shouldn't directly set the flags of an object because there could be other flags set that would be erased. Instead, we can unset T_MASK and set T_ICLASS isntead.
Notes: Merged: https://.com/ruby/ruby/pull/12667
-rw-r--r--vm.c3
1 files changed, 2 insertions, 1 deletions
@@ -3954,7 +3954,8 @@ Init_VM(void)
fcore = rb_class_new(rb_cBasicObject);
rb_set_class_path(fcore, rb_cRubyVM, "FrozenCore");
rb_vm_register_global_object(rb_class_path_cached(fcore));
- RBASIC(fcore)->flags = T_ICLASS;
klass = rb_singleton_class(fcore);
rb_define_method_id(klass, id_core_set_method_alias, m_core_set_method_alias, 3);
rb_define_method_id(klass, id_core_set_variable_alias, m_core_set_variable_alias, 2);