summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-12-11 00:08:56 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-12-11 00:08:56 +0900
commit4eff93632f6d96aa8dd6aaf0513c22c3c3abfda3 (patch)
treed730b091ae20802f1d3dd34c60ce4f704b4996f5 /src/parse.y
parentb48514bdcb3fa1d53eb7be9b68a769af3181d0c0 (diff)
downloadmruby-4eff93632f6d96aa8dd6aaf0513c22c3c3abfda3.tar.gz
mruby-4eff93632f6d96aa8dd6aaf0513c22c3c3abfda3.zip
mrb_parser_dump() did not work with block arguments
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parse.y b/src/parse.y
index f8e1ff9aa..ff5df7822 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -6329,10 +6329,9 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
printf("post mandatory args:\n");
dump_recur(mrb, n->car, offset+2);
}
- n = n->cdr;
- if (n) {
+ if (n->cdr) {
dump_prefix(n, offset+1);
- printf("blk=&%s\n", mrb_sym2name(mrb, sym(n)));
+ printf("blk=&%s\n", mrb_sym2name(mrb, sym(n->cdr)));
}
}
mrb_parser_dump(mrb, tree->cdr->car, offset+1);