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

Performance/Detect autocorrect mangles on rogue newline #2295

Closed
matthewd opened this issue Oct 4, 2015 · 0 comments
Closed

Performance/Detect autocorrect mangles on rogue newline #2295

matthewd opened this issue Oct 4, 2015 · 0 comments
Labels

Comments

@matthewd
Copy link

matthewd commented Oct 4, 2015

0.34.2 (using Parser 2.2.2.6, running on ruby 2.2.3 x86_64-darwin14)

Performance/Detect auto-corrects:

foo.select { true }
  .first['x']

to:

foo.find { true }
  ['x']

The newline sends us astray, leaving ['x'] as an array literal.

@bbatsov bbatsov added the bug label Oct 7, 2015
@bbatsov bbatsov closed this as completed in 9a82280 Oct 8, 2015
bbatsov added a commit that referenced this issue Oct 8, 2015
[Fix #2295] Fix Detect autocorrect with newlines
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