Commit ca642dd3 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1624 from cubicdaiya/issues/invalid_return_in_top_level

return-value of mrb_run is invalid in top-level-scope
parents c845798b 325c3bcf
......@@ -661,7 +661,7 @@ scope_body(codegen_scope *s, node *tree, int val)
{
codegen_scope *scope = scope_new(s->mrb, s, tree->car);
codegen(scope, tree->cdr, val);
codegen(scope, tree->cdr, VAL);
if (!s->iseq) {
genop(scope, MKOP_A(OP_STOP, 0));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment