summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-04-02 02:28:00 +0900
committerKoichi Sasada <ko1@atdot.net>2021-04-02 09:25:33 +0900
commitecfa8dcdbaf60cbe878389439de9ac94bc82e034 (patch)
tree96799499a1482fca420606ff98e648c1496ae917 /vm_dump.c
parentc080bb2284c06fbc5e8090c27781228d487c4021 (diff)
fix return from orphan Proc in lambda
A "return" statement in a Proc in a lambda like: `lambda{ proc{ return }.call }` should return outer lambda block. However, the inner Proc can become orphan Proc from the lambda block. This "return" escape outer-scope like method, but this behavior was decieded as a bug. [Bug #17105] This patch raises LocalJumpError by checking the proc is orphan or not from lambda blocks before escaping by "return". Most of tests are written by Jeremy Evans https://github.com/ruby/ruby/pull/4223
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4347
Diffstat (limited to 'vm_dump.c')
0 files changed, 0 insertions, 0 deletions