1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

node.c: fix SEGV of ->(a:){} when --dump=parsetree

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-01-07 12:55:10 +00:00
parent f3aa3cd825
commit 933a3eb07e

9
node.c
View file

@ -378,8 +378,13 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
ANN("format: [nd_vid](current dvar) = [nd_value]");
ANN("example: 1.times { x = foo }");
F_ID(nd_vid, "local variable");
LAST_NODE;
F_NODE(nd_value, "rvalue");
if (node->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD) {
F_MSG(nd_value, "rvalue", "NODE_SPECIAL_REQUIRED_KEYWORD (required keyword argument)");
}
else {
LAST_NODE;
F_NODE(nd_value, "rvalue");
}
return;
case NODE_IASGN:
ANN("instance variable assignment");