Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Out of range referencing #3

Closed
pocke opened this issue Feb 22, 2020 · 1 comment
Closed

Out of range referencing #3

pocke opened this issue Feb 22, 2020 · 1 comment

Comments

@pocke
Copy link
Owner

pocke commented Feb 22, 2020

/(foo)bar/ =~ 'foobar'
p $1 # => foo
p $2 # => nil

$2 is always nil with the regexp, so RuboCop should warn it.

@pocke
Copy link
Owner Author

pocke commented Feb 25, 2020

issued rubocop/rubocop#7755

@pocke pocke closed this as completed Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant