-
-
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
LiteralInInterpolation false positive when interpolating "#{__LINE__}" #1769
Comments
I am not sure of the proper way to fix this. After looking into the code, the error is caused by |
I think you must look at the actual source to sort out this special case. node.loc.expression.is?('__LINE__') |
Yeah, that should solve it. Unfortunately its a somewhat expensive check, but I can think of no other alternatives. |
[Fix #1769] LiteralInInterpolation registers an offense for __LINE__
I just upgraded to RuboCop 0.30.0 and ran into a false positive when running LiteralInInterpolation.
Here is a test that exercises the bug.
I will try to find a fix for the issue, but in the mean time, I wanted to bring exposure to the bug.
The text was updated successfully, but these errors were encountered: