-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShadowingOuterLocalVariable and UnusedLocalVariable triggered by Regexp with named captures #332
Comments
I'm looking at this, but it probably takes some time to handle this because the named capture variables don't appear in the AST. |
@yujinakayama Pretty sure @whitequark implemented support for them recently. |
@yujinakayama No problem : this occurs in a legacy project I am cleaning, and I do not think I'll keep those named captures... |
@bbatsov I cannot see any node for it in both AST and the document. $ ruby-parse -V
ruby-parse based on parser version 2.0.0.beta10
$ ruby-parse -e '/(?<match>bar)/ =~ baz'
(match-with-lvasgn
(regexp
(str "(?<match>bar)")
(regopt))
(send nil :baz)) |
@yujinakayama Eh? You're looking at this node: |
@whitequark Oh I didn't even know |
2 errors occurred:
An error occurred while ShadowingOuterLocalVariable cop was inspecting
...
An error occurred while UnusedLocalVariable cop was inspecting ...
0.9.0 (using Parser 2.0.0.beta9, running on ruby 1.9.3 i386-mingw32)
Both errors are triggered by the following line :
The text was updated successfully, but these errors were encountered: