From 933a3eb07e315e801cbddd804af81cc03f47d2a1 Mon Sep 17 00:00:00 2001 From: mame Date: Sun, 7 Jan 2018 12:55:10 +0000 Subject: [PATCH] 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(-) 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");