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

Wrong offence detected? #214

Closed
jatap opened this issue May 29, 2013 · 9 comments
Closed

Wrong offence detected? #214

jatap opened this issue May 29, 2013 · 9 comments
Milestone

Comments

@jatap
Copy link

jatap commented May 29, 2013

New 0.8.0 version throws this offence:

C: 76: Space inside hash literal braces missing.

# spec/routing/routing_spec.rb
it { expect(get: "/#{locale.to_s}/#{fake_path}").not_to be_routable }

0.7.2 marks as valid

@bbatsov
Copy link
Collaborator

bbatsov commented May 29, 2013

What's the offence?

@jatap
Copy link
Author

jatap commented May 29, 2013

EDIT
Included offence:

C: 76: Space inside hash literal braces missing.

@bbatsov
Copy link
Collaborator

bbatsov commented May 29, 2013

Hmm, I don't see an offence for this bit of code when I test locally. @jonas054, any ideas?

@jonas054
Copy link
Collaborator

I have been able to reproduce the problem on jruby-1.7.4, but not on ruby-1.9.3-p194 or ruby-2.0.0-p0. DOS/Unix line endings did not make a difference and parser version (beta2/beta3) dind't either. @jatap Were you running on JRuby?

@bbatsov
Copy link
Collaborator

bbatsov commented May 29, 2013

I guess we might ask @whitequark to have a look at this as well - if it's a Parser bug on JRuby. We also have to understand if the Rubinius build is broken by a RuboCop/Parser/Rubinius bug. @whitequark, can you have a quick look here https://travis-ci.org/bbatsov/rubocop/jobs/7597994 and let us know what do you think?

@jonas054
Copy link
Collaborator

I think the problem is within rubocop. We have a problem with hashes without braces, in this case get: "/#{locale.to_s}/#{fake_path}". Looks like what I said about platforms might not be entirely correct. I'll try to fix it later tonight, unless you want it @bbatsov.

@bbatsov
Copy link
Collaborator

bbatsov commented May 29, 2013

Go ahead and fix it, @jonas054. I'll be having a computerless evening tonight :-)

@jatap
Copy link
Author

jatap commented Jul 10, 2013

Sorry about delay. I'm gonna check use case again.

@jatap
Copy link
Author

jatap commented Jul 10, 2013

$ rubocop spec/routing/routing_spec.rb
1 file inspected, no offences detected.

Thanks for your work.

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

3 participants