Allow OP_RETURN_BLK to cross C boundaries

The restriction was introduced in commit b563bcb7ff to resolve https://github.com/mruby/mruby/issues/3462.
Subsequently, the `RBreak` object, introduced by mruby 1.3.0, allowed crossing the C boundary.

```ruby
def cross; Class.new { proc { return }.call }; end; cross
# => unexpected return (LocalJumpError) # without this patch
# => nothing raised                     # with this patch
```
This commit is contained in:
dearblue
2023-12-24 13:56:25 +09:00
parent 63580581f7
commit d41a2612f4
-4
View File
@@ -2319,10 +2319,6 @@ RETRY_TRY_BLOCK:
}
/* check jump destination */
while (cibase <= ci && ci->proc != dst) {
if (ci->cci > CINFO_NONE) { /* jump cross C boundary */
localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
goto L_RAISE;
}
ci--;
}
if (ci <= cibase) { /* no jump destination */