diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-11 02:30:24 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-11 02:30:24 +0900 |
| commit | fff4a4ed34b2692227b0f9d5773872b8410fd08d (patch) | |
| tree | a6b4f94e6f229d9f34b7fd090b3b1d3ba5fc2dc5 /mrbgems/mruby-compiler | |
| parent | db47ae5de559f95dd4e9821a01e393dee38d9404 (diff) | |
| download | mruby-fff4a4ed34b2692227b0f9d5773872b8410fd08d.tar.gz mruby-fff4a4ed34b2692227b0f9d5773872b8410fd08d.zip | |
OP_LAMBDA generation should honor VAL/NOVAL; fix #3580
Diffstat (limited to 'mrbgems/mruby-compiler')
| -rw-r--r-- | mrbgems/mruby-compiler/core/codegen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 64f4702a7..901e87934 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -1383,7 +1383,7 @@ codegen(codegen_scope *s, node *tree, int val) break; case NODE_LAMBDA: - { + if (val) { int idx = lambda_body(s, tree, 1); genop(s, MKOP_Abc(OP_LAMBDA, cursp(), idx, OP_L_LAMBDA)); @@ -1392,7 +1392,7 @@ codegen(codegen_scope *s, node *tree, int val) break; case NODE_BLOCK: - { + if (val) { int idx = lambda_body(s, tree, 1); genop(s, MKOP_Abc(OP_LAMBDA, cursp(), idx, OP_L_BLOCK)); |
