From 243842f68a97a34a36a7e8c690efe7e18bf81e91 Mon Sep 17 00:00:00 2001 From: ktsj Date: Sat, 20 Apr 2019 03:37:22 +0000 Subject: Avoid usage of the dummy empty BEGIN node Use NODE_SPECIAL_NO_NAME_REST instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- node.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'node.c') diff --git a/node.c b/node.c index eb88efc61a..323debc2a3 100644 --- a/node.c +++ b/node.c @@ -1040,7 +1040,12 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node) ANN("format: [nd_pconst]([pre_args], ..., *[rest_arg], [post_args], ...)"); F_NODE(nd_pconst, "constant"); F_NODE(nd_apinfo->pre_args, "pre arguments"); - F_NODE(nd_apinfo->rest_arg, "rest argument"); + if (NODE_NAMED_REST_P(node->nd_apinfo->rest_arg)) { + F_NODE(nd_apinfo->rest_arg, "rest argument"); + } + else { + F_MSG(nd_apinfo->rest_arg, "rest argument", "NODE_SPECIAL_NO_NAME_REST (rest argument without name)"); + } LAST_NODE; F_NODE(nd_apinfo->post_args, "post arguments"); return; -- cgit v1.2.1