Skip to content

Commit 70f2e4b

Browse files
committed
Add AndNode to Ternaryable
1 parent 3f7dd1b commit 70f2e4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/syntax_tree/node.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6350,7 +6350,7 @@ def call(q, node)
63506350
# want to force it to not be a ternary, like if the predicate is an
63516351
# assignment because it's hard to read.
63526352
case node.predicate
6353-
when Assign, Binary, Command, CommandCall, MAssign, OpAssign
6353+
when Assign, AndNode, Binary, Command, CommandCall, MAssign, OpAssign
63546354
return false
63556355
when Not
63566356
return false unless node.predicate.parentheses?

0 commit comments

Comments
 (0)