Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 44a431d

Browse files
committed
Add AndNode to Ternaryable
1 parent 72df5d6 commit 44a431d

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
@@ -6336,7 +6336,7 @@ def call(q, node)
63366336
# want to force it to not be a ternary, like if the predicate is an
63376337
# assignment because it's hard to read.
63386338
case node.predicate
6339-
when Assign, Binary, Command, CommandCall, MAssign, OpAssign
6339+
when Assign, AndNode, Binary, Command, CommandCall, MAssign, OpAssign
63406340
return false
63416341
when Not
63426342
return false unless node.predicate.parentheses?

0 commit comments

Comments
 (0)