lib/rubocop/cop/style/negated_if.rb in rubocop-0.47.0 vs lib/rubocop/cop/style/negated_if.rb in rubocop-0.47.1
- old
+ new
@@ -9,10 +9,10 @@
include NegativeConditional
MSG = 'Favor `%s` over `%s` for negative conditions.'.freeze
def on_if(node)
- return if node.elsif?
+ return if node.elsif? || node.ternary?
check_negative_conditional(node)
end
def message(node)