diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-30 21:10:30 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-30 21:10:30 -0800 |
| commit | ca642dd3ef5c654f737ea6553d1ed9476acb172e (patch) | |
| tree | 6a42dfbb7cdba7acfc8cd2a9377add5aa576bca5 | |
| parent | c845798ba40d16b94d421b7a128497c009726e75 (diff) | |
| parent | 325c3bcfa43f62e7926022cb8950c69f984c0dc2 (diff) | |
| download | mruby-ca642dd3ef5c654f737ea6553d1ed9476acb172e.tar.gz mruby-ca642dd3ef5c654f737ea6553d1ed9476acb172e.zip | |
Merge pull request #1624 from cubicdaiya/issues/invalid_return_in_top_level
return-value of mrb_run is invalid in top-level-scope
| -rw-r--r-- | src/codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c index a25d4aaa9..4f7eaea79 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -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)); } |
