diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-02-24 22:07:36 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-02-24 22:07:36 +0900 |
| commit | a2a272ca8ebecdc037b352ee95492accfeab9457 (patch) | |
| tree | 3f7b782081a8ace63a854b4d68485d31ca439130 /src/codegen.c | |
| parent | 68f60714dc54f0b040243428822213f5f1c0fc2b (diff) | |
| parent | 4b4ddd5a28b74ce6add69667d542aaa3f3dfa38c (diff) | |
| download | mruby-a2a272ca8ebecdc037b352ee95492accfeab9457.tar.gz mruby-a2a272ca8ebecdc037b352ee95492accfeab9457.zip | |
Merge pull request #2730 from kou/fix-no-expression-case
Fix a bug that no expression case doesn't return valid value
Diffstat (limited to 'src/codegen.c')
| -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 1fe26355f..c8f964f56 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -1458,7 +1458,7 @@ codegen(codegen_scope *s, node *tree, int val) int pos = cursp(); genop(s, MKOP_A(OP_LOADNIL, cursp())); if (pos3) dispatch_linked(s, pos3); - pop(); + if (head) pop(); genop(s, MKOP_AB(OP_MOVE, cursp(), pos)); push(); } |
