зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
1a2b90d5e6
Коммит
d3a54f6fe8
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Jul 2 03:20:00 2014 Charlie Somerville <charliesome@ruby-lang.org>
|
||||||
|
|
||||||
|
* node.c (dump_node): handle nd_value == (NODE *)-1 to mean this
|
||||||
|
keyword argument is required
|
||||||
|
|
||||||
Wed Jul 2 02:57:27 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Jul 2 02:57:27 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm.c (rb_vm_env_local_variables): returns array of local
|
* vm.c (rb_vm_env_local_variables): returns array of local
|
||||||
|
|
7
node.c
7
node.c
|
@ -300,7 +300,12 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
|
||||||
asgn:
|
asgn:
|
||||||
F_ID(nd_vid, "variable");
|
F_ID(nd_vid, "variable");
|
||||||
LAST_NODE;
|
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;
|
break;
|
||||||
|
|
||||||
case NODE_GASGN:
|
case NODE_GASGN:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче