Pattern: Regexp as condition
Issue: -
This rule checks for regexp literals used as match-current-line
.
If a regexp literal is in condition, the regexp matches $_
implicitly.
# bad
if /foo/
do_something
end
# good
if /foo/ =~ $_
do_something
end