diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-12-23 22:19:20 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-12-23 22:19:20 +0900 |
| commit | 7f630d41ab7341daec4cf5c8eaabc1e1cc31bcc5 (patch) | |
| tree | b2b7cd63cba1d80fbb9226aeacb10ae54e4f7b0a /src/codegen.c | |
| parent | e618438882606c8318bcc4eae2c47ce8ab82d6aa (diff) | |
| parent | 5ec676aa37b1c6e345b29ffa02ea8210b7a94da5 (diff) | |
| download | mruby-7f630d41ab7341daec4cf5c8eaabc1e1cc31bcc5.tar.gz mruby-7f630d41ab7341daec4cf5c8eaabc1e1cc31bcc5.zip | |
Merge pull request #2684 from kou/fix-splat-and-multiple-assignments
Fix splat and multiple assignments
Diffstat (limited to 'src/codegen.c')
| -rw-r--r-- | src/codegen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c index d22892ecf..46d457885 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -1001,7 +1001,9 @@ gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val) } if (val) { genop(s, MKOP_AB(OP_MOVE, cursp(), rhs)); - push(); + } + else { + pop(); } genop(s, MKOP_ABC(OP_APOST, cursp(), n, post)); n = 1; @@ -1016,6 +1018,7 @@ gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val) n++; } } + push(); } } |
