Commit 325c3bcf authored by cubicdaiya's avatar cubicdaiya

return-value of mrb_run is invalid in top-level-scope

The return-value of mrb_run in top-level-scope
should be the evaluated value at last.
parent 14bff248
......@@ -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