Pattern: Redundant condition
Issue: -
This rule checks for redundant conditional expressions.
# bad
a = b ? b : c
# good
a = b || c
# bad
if b
b
else
c
end
# good
b || c
# good
if b
b
elsif cond
c
end
Pattern: Redundant condition
Issue: -
This rule checks for redundant conditional expressions.
# bad
a = b ? b : c
# good
a = b || c
# bad
if b
b
else
c
end
# good
b || c
# good
if b
b
elsif cond
c
end