class Rubocop::Cop::Style::AvoidPerlBackrefs
This cop looks for uses of Perl-style regexp match backreferences like $1, $2, etc.
Public Instance Methods
on_nth_ref(node)
click to toggle source
Calls superclass method
# File lib/rubocop/cop/style/avoid_perl_backrefs.rb, line 9 def on_nth_ref(node) backref, = *node add_offence(:convention, node.loc.expression, "Prefer the use of MatchData over $#{backref}.") super end