Skip to content
Permalink
Browse files
should ignore block to next, break, etc. fix #3039
  • Loading branch information
matz committed Dec 1, 2015
1 parent 81a7b40 commit c2996514d38e9df4dc4e0dcbdfd0d3ca73af668f
Showing 1 changed file with 9 additions and 4 deletions.
@@ -852,19 +852,24 @@ call_with_block(parser_state *p, node *a, node *b)
{
node *n;

if (a->car == (node*)NODE_SUPER ||
a->car == (node*)NODE_ZSUPER) {
switch ((enum node_type)a->car) {
case NODE_SUPER:
case NODE_ZSUPER:
if (!a->cdr) a->cdr = cons(0, b);
else {
args_with_block(p, a->cdr, b);
}
}
else {
break;
case NODE_CALL:
case NODE_FCALL:
n = a->cdr->cdr->cdr;
if (!n->car) n->car = cons(0, b);
else {
args_with_block(p, n->car, b);
}
break;
default:
break;
}
}

0 comments on commit c299651

Please sign in to comment.