lib/rubocop/cop/style/ternary_parentheses.rb in rubocop-0.49.0 vs lib/rubocop/cop/style/ternary_parentheses.rb in rubocop-0.49.1
- old
+ new
@@ -97,10 +97,10 @@
end
# If the condition is parenthesized we recurse and check for any
# complex expressions within it.
def complex_condition?(condition)
- if condition.type == :begin
+ if condition.begin_type?
condition.to_a.any? { |x| complex_condition?(x) }
else
non_complex_type?(condition) ? false : true
end
end