Ractor.make_shareable(proc_obj) makes inner structure shareable

Proc objects are now traversed like other objects when making them
shareable.

Fixes [Bug #19372]
Fixes [Bug #19374]
This commit is contained in:
lukeg 2023-01-25 07:45:19 -05:00 committed by John Hawthorn
parent 2183899fd1
commit d80f3a287c
Notes: git 2025-03-26 23:05:18 +00:00
3 changed files with 48 additions and 14 deletions

2
vm.c
View file

@ -1415,7 +1415,7 @@ rb_proc_ractor_make_shareable(VALUE self)
proc->is_isolated = TRUE;
}
FL_SET_RAW(self, RUBY_FL_SHAREABLE);
rb_obj_freeze(self);
return self;
}