ruby-changes:69784
From: Yusuke <ko1@a...>
Date: Wed, 17 Nov 2021 23:57:14 +0900 (JST)
Subject: [ruby-changes:69784] 753cfbdbf3 (master): node.c (dump_node): update format explanation for NODE_ARGS
https://git.ruby-lang.org/ruby.git/commit/?id=753cfbdbf3 From 753cfbdbf33bd4766503ee37626618d973e587b7 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Wed, 17 Nov 2021 23:38:52 +0900 Subject: node.c (dump_node): update format explanation for NODE_ARGS --- node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node.c b/node.c index 548e4f9fe1f..3dea7fe398e 100644 --- a/node.c +++ b/node.c @@ -1017,8 +1017,8 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node) https://github.com/ruby/ruby/blob/trunk/node.c#L1017 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"); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/