There is caching in Symbol#to_proc (rb_sym_to_proc) that makes the assumption that we're always in the main ractor. With multiple ractors, this caching logic is not ractor-safe in that cached procs created in one ractor can leak into other ractors. In a debug build, this results in a ractor_confirm_belonging assertion failure.
Fix Symbol#to_proc (rb_sym_to_proc) to be ractor safe
In non-main ractors, don't use sym_proc_cache. It is not thread-safe
to add to this array without a lock and also it leaks procs from one
ractor to another. Instead, we create a new proc each time. If this
results in poor performance we can come up with a solution later.