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

Overzealous autocorrect for single-quoted strings #283

Closed
whitequark opened this issue Jun 17, 2013 · 2 comments
Closed

Overzealous autocorrect for single-quoted strings #283

whitequark opened this issue Jun 17, 2013 · 2 comments
Assignees
Labels

Comments

@whitequark
Copy link

The following string shouldn't be re-quoted: "foo \\\n bar".

This is also not in a need for correction :) %w(' ")

In fact parser's builtin rewrite safety mechanism should have prevented that... dunno why you decided to turn it off.

@ghost ghost assigned bbatsov Jun 20, 2013
@bbatsov
Copy link
Collaborator

bbatsov commented Jun 30, 2013

Since all cops are rewriters, changes they make have to be written back immediate or they'd be written over by the next rewriter. The current code is flawed since the source buffer is updated, but the ast and the tokes are not. I should think of some better solution, but haven't had much time to work on that feature lately.

bbatsov pushed a commit that referenced this issue Aug 9, 2013
@bbatsov
Copy link
Collaborator

bbatsov commented Aug 9, 2013

Fixed.

@bbatsov bbatsov closed this as completed Aug 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants