summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/parse.y b/src/parse.y
index 3f542a3b3..d31711b68 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -754,11 +754,21 @@ args_with_block(parser_state *p, node *a, node *b)
static void
call_with_block(parser_state *p, node *a, node *b)
{
- node *n = a->cdr->cdr->cdr;
+ node *n;
- if (!n->car) n->car = cons(0, b);
+ if (a->car == (node*)NODE_SUPER ||
+ a->car == (node*)NODE_ZSUPER) {
+ if (!a->cdr) a->cdr = cons(0, b);
+ else {
+ args_with_block(p, a->cdr, b);
+ }
+ }
else {
- args_with_block(p, n->car, b);
+ n = a->cdr->cdr->cdr;
+ if (!n->car) n->car = cons(0, b);
+ else {
+ args_with_block(p, n->car, b);
+ }
}
}