Skip to content
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

Lint/LiteralInInterpolation incorrectly flags interpolation of backticks #2647

Closed
aevernon opened this issue Jan 15, 2016 · 1 comment
Closed

Comments

@aevernon
Copy link

Steps to Reproduce

$ echo 'puts "Backticks #{`date`}"' > foo.rb
$ rubocop foo.rb 

Observed Behavior

foo.rb:1:19: W: Literal interpolation detected.
puts "Backticks #{`date`}"'
                  ^^^^^^

Expected Behavior

Interpolation of dynamic string literals should be allowed.

Environment

$ rubocop -V
0.36.0 (using Parser 2.3.0.1, running on ruby 2.2.4 x86_64-linux)
@segiddins
Copy link
Contributor

The cop failing is actually Lint/LiteralInInterpolation.

@aevernon aevernon changed the title Style/UnneededInterpolation incorrectly flags interpolation of backticks Lint/LiteralInInterpolation incorrectly flags interpolation of backticks Jan 15, 2016
segiddins added a commit to segiddins/rubocop that referenced this issue Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants