Skip to content

Commit

Permalink
OP_LAMBDA generation should honor VAL/NOVAL; fix #3580
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 10, 2017
1 parent db47ae5 commit fff4a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mrbgems/mruby-compiler/core/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand Down

0 comments on commit fff4a4e

Please sign in to comment.