summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-20 03:37:22 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-20 03:37:22 +0000
commit243842f68a97a34a36a7e8c690efe7e18bf81e91 (patch)
tree01e3cc7f31dd70d6bb1e1e44bc83d576eb031456 /node.c
parent27f75cf3dc74ad70d065a7d8a14dbaa0eeac1023 (diff)
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
Diffstat (limited to 'node.c')
-rw-r--r--node.c7
1 files changed, 6 insertions, 1 deletions
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;