aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-11-17 23:38:52 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-11-17 23:38:52 +0900
commit753cfbdbf33bd4766503ee37626618d973e587b7 (patch)
tree9110c3b6eb441843e5aca547bafb3e50977f28b6 /node.c
parent5a7b4dba26e29f5942265267688625b5be174064 (diff)
downloadruby-753cfbdbf33bd4766503ee37626618d973e587b7.tar.gz
node.c (dump_node): update format explanation for NODE_ARGS
Diffstat (limited to 'node.c')
-rw-r--r--node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/node.c b/node.c
index 548e4f9fe1..3dea7fe398 100644
--- a/node.c
+++ b/node.c
@@ -1017,8 +1017,8 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
case NODE_ARGS:
ANN("method parameters");
- ANN("format: def method_name(.., [nd_opt=some], *[nd_rest], [nd_pid], .., &[nd_body])");
- ANN("example: def foo(a, b, opt1=1, opt2=2, *rest, y, z, &blk); end");
+ ANN("format: def method_name(.., [nd_ainfo->nd_optargs], *[nd_ainfo->rest_arg], [nd_ainfo->first_post_arg], .., [nd_ainfo->kw_args], **[nd_ainfo->kw_rest_arg], &[nd_ainfo->block_arg])");
+ ANN("example: def foo(a, b, opt1=1, opt2=2, *rest, y, z, kw: 1, **kwrest, &blk); end");
F_INT(nd_ainfo->pre_args_num, "count of mandatory (pre-)arguments");
F_NODE(nd_ainfo->pre_init, "initialization of (pre-)arguments");
F_INT(nd_ainfo->post_args_num, "count of mandatory post-arguments");