Cop idea: Referencing named capture with a number · Issue #7754 · rubocop/rubocop
Is your feature request related to a problem? Please describe. Regexp's named capture can be referenced with a number, but referencing with a name is preferred. # bad 'str'.match(/(?<X>s)/)[1] # =>...</x>