ruby-changes:49540
From: mame <ko1@a...>
Date: Sun, 7 Jan 2018 21:55:16 +0900 (JST)
Subject: [ruby-changes:49540] mame:r61655 (trunk): node.c: fix SEGV of `->(a:){}` when --dump=parsetree
mame 2018-01-07 21:55:10 +0900 (Sun, 07 Jan 2018) New Revision: 61655 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61655 Log: node.c: fix SEGV of `->(a:){}` when --dump=parsetree Modified files: trunk/node.c Index: node.c =================================================================== --- node.c (revision 61654) +++ node.c (revision 61655) @@ -378,8 +378,13 @@ dump_node(VALUE buf, VALUE indent, int c https://github.com/ruby/ruby/blob/trunk/node.c#L378 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"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/