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

parse.y: condition node

* parse.y (logop_gen): keep non-null condition node.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-01-29 13:22:39 +00:00
parent 9a39740ef3
commit 082445e7af
2 changed files with 2 additions and 1 deletions

View file

@ -376,6 +376,8 @@ assert_equal %q{1}, %q{1 or 2 or 3 or 4}
assert_equal %q{1}, %q{1 or false or 3 or 4}
assert_equal %q{2}, %q{nil or 2 or 3 or 4}
assert_equal %q{2}, %q{false or 2 or 3 or 4}
assert_equal %q{1}, %q{if true && ""; then 1; end}
assert_equal %q{1}, %q{if nil || true; then 1; end}
assert_equal %q{false}, %q{nil or false or nil or false}
assert_equal %q{elseng}, %q{
case

View file

@ -9694,7 +9694,6 @@ logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *r
case NODE_NIL:
case NODE_FALSE:
if (type == NODE_AND) return left;
left = 0;
break;
case NODE_TRUE:
case NODE_LIT: