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

Literal space causes false positive from UnneededCapitalW #1263 #3334

Closed
chuckd opened this issue Jul 21, 2016 · 0 comments · Fixed by #3573
Closed

Literal space causes false positive from UnneededCapitalW #1263 #3334

chuckd opened this issue Jul 21, 2016 · 0 comments · Fixed by #3573
Labels

Comments

@chuckd
Copy link

chuckd commented Jul 21, 2016

#1263 fixed Style/UnneededCapitalW to allow word arrays that include special characters and escape strings, however literal space (\s) still causes a false positive.

%W(\s)

It's a slightly strange use of a word array I guess but in my case the easiest given a long array where one or two elements need to be a blank string.

I had a go at fixing myself, it's something to do with the double_quotes_acceptable? method, but couldn't see how obviously to change it.

$ rubocop -V
0.40.0 (using Parser 2.3.1.2, running on ruby 2.3.1 x86_64-darwin15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants