summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-01 18:21:22 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-01 18:21:22 +0000
commitd3a54f6fe866f2c582a68453cc03a6a925dc5b0a (patch)
treef4c54207f482e9938257772b48972157c8b3c07e /node.c
parent1a2b90d5e6c7b6ecd1d4c0ba9445fb730b39776b (diff)
Fix --dump=parsetree segfault on required keyword argument
* node.c (dump_node): handle nd_value == (NODE *)-1 to mean this keyword argument is required git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/node.c b/node.c
index 15d27df..e251d85 100644
--- a/node.c
+++ b/node.c
@@ -300,7 +300,12 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
asgn:
F_ID(nd_vid, "variable");
LAST_NODE;
- F_NODE(nd_value, "rvalue");
+ if (node->nd_value == (NODE *)-1) {
+ F_MSG(nd_value, "rvalue", "(required keyword argument)");
+ }
+ else {
+ F_NODE(nd_value, "rvalue");
+ }
break;
case NODE_GASGN: