aboutsummaryrefslogtreecommitdiffstats
path: root/ast.c
diff options
context:
space:
mode:
authormanga_osyo <manga.osyo@gmail.com>2020-07-07 20:18:18 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-08 17:43:04 +0900
commitff5e66034006a875125581114cce19d46843b32a (patch)
treec77187300742268bd78e358b5d8ea67e46a52a8e /ast.c
parent57cde28c20ac0714b5dfad97414f71d9af373084 (diff)
downloadruby-ff5e66034006a875125581114cce19d46843b32a.tar.gz
Added `NODE_SPECIAL_EXCESSIVE_COMMA` info to `ARGS` of `RubyVM::AbstractSyntaxTree`.
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ast.c b/ast.c
index 27a1074871..575458fa95 100644
--- a/ast.c
+++ b/ast.c
@@ -547,7 +547,9 @@ node_children(rb_ast_t *ast, NODE *node)
var_name(ainfo->first_post_arg),
INT2NUM(ainfo->post_args_num),
NEW_CHILD(ast, ainfo->post_init),
- var_name(ainfo->rest_arg),
+ (ainfo->rest_arg == NODE_SPECIAL_EXCESSIVE_COMMA
+ ? ID2SYM(rb_intern("NODE_SPECIAL_EXCESSIVE_COMMA"))
+ : var_name(ainfo->rest_arg)),
(ainfo->no_kwarg ? Qfalse : NEW_CHILD(ast, ainfo->kw_args)),
(ainfo->no_kwarg ? Qfalse : NEW_CHILD(ast, ainfo->kw_rest_arg)),
var_name(ainfo->block_arg));