mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
16151a0daa
A copied Proc now always carries `MRB_PROC_ORPHAN`, so calling a `dup`'d block that contains `break` or `return` raises `LocalJumpError` even while the original yielding method is still on the stack. This is stricter than CRuby — which only marks the copy orphan once the original yielding method returns — but matches mruby's memory-first design: tracking the original via a back pointer in RProc would also enlarge the GC mark set. dearblue's option (1) in the linked issue, accepted for the simpler RProc layout. Document the divergence in `doc/limitations.md` and add a regression test in `test/t/proc.rb`. close #6345 Co-authored-by: Claude <noreply@anthropic.com>