class RuboCop::Cop::Lint::RegexpAsCondition
end
do_something
if /foo/ =~ $_
# good
end
do_something
if /foo/
# bad
@example
If a regexp literal is in condition, the regexp matches ‘$_` implicitly.
This cop checks for regexp literals used as `match-current-line`.
def on_match_current_line(node)
def on_match_current_line(node) add_offense(node) end