mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
OP_LAMBDA generation should honor VAL/NOVAL; fix #3580
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user