From fff4a4ed34b2692227b0f9d5773872b8410fd08d Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 11 Apr 2017 02:30:24 +0900 Subject: OP_LAMBDA generation should honor VAL/NOVAL; fix #3580 --- mrbgems/mruby-compiler/core/codegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mrbgems/mruby-compiler') 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)); -- cgit v1.2.3