Duplicate
elsif
condition detected.44# Raises "duplicate elsif block detected"
45if x == 1
46 do_something
47elsif x == 148 do_something_else
49end
50
Description
An elsif block that has the checks the same condition as any other if/elsif block above is redundant and can be removed.
Bad practice
if x == 1
do_something
elsif x == 1
do_something_else
end
Recommended
if x == 1
do_something
elsif x == 2
do_something_else
end