From 40d72d08bb3f684e3fed53bcc8d717b3d1d3eca8 Mon Sep 17 00:00:00 2001 From: mame Date: Sun, 7 Jan 2018 12:55:10 +0000 Subject: 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 --- node.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'node.c') diff --git a/node.c b/node.c index 4b34b8dab6..bc61f3afc5 100644 --- a/node.c +++ b/node.c @@ -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"); -- cgit v1.2.3