summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-07 12:55:10 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-07 12:55:10 +0000
commit933a3eb07e315e801cbddd804af81cc03f47d2a1 (patch)
treefe61f2db6074f5b1ef37f314c1aacb379bea0ca6 /node.c
parentf3aa3cd8259304375ff250b4980db49ac024e747 (diff)
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
Diffstat (limited to 'node.c')
-rw-r--r--node.c9
1 files 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");