1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

node.c: no nd_compile_option unless set

* node.c (dump_node): show nd_compile_option only when it is set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-03-10 07:27:41 +00:00
parent 72b3e226fc
commit 2d39d11436

11
node.c
View file

@ -865,11 +865,14 @@ dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
ANN("pre-execution");
ANN("format: BEGIN { [nd_head] }; [nd_body]");
ANN("example: bar; BEGIN { foo }");
F_NODE(nd_head, "prelude");
F_NODE(nd_body, "body");
LAST_NODE;
#define nd_compile_option u3.value
F_OPTION(nd_compile_option, "compile_option");
F_NODE(nd_head, "prelude");
if (!node->nd_compile_option) LAST_NODE;
F_NODE(nd_body, "body");
if (node->nd_compile_option) {
LAST_NODE;
F_OPTION(nd_compile_option, "compile_option");
}
break;
case NODE_LAMBDA: