Cop idea: Out of range referencing for Regexp · Issue #7755 · rubocop/rubocop
Is your feature request related to a problem? Please describe. When a reference for Regepx is out of range, it always returns nil. /(foo)bar/ =~ 'foobar' # ok p $1 # => foo # bad - $2 always return...