Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0c5b24b

Browse files
committedMar 28, 2023
Add AndNode to Ternaryable
1 parent 689338e commit 0c5b24b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/syntax_tree/node.rb

+1-1
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)
Please sign in to comment.