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

Hash.new autocorrect leaves invalid ruby #1574

Closed
JeanMertz opened this issue Jan 17, 2015 · 0 comments
Closed

Hash.new autocorrect leaves invalid ruby #1574

JeanMertz opened this issue Jan 17, 2015 · 0 comments
Assignees
Labels

Comments

@JeanMertz
Copy link

this:

yadayada.map { ... }.reduce Hash.new, :merge

gets auto corrected to:

yadayada.map { ... }.reduce {}, :merge

Which is invalid Ruby. Braces would fix the problem, but they didn't get added automatically.

@jonas054 jonas054 self-assigned this Jan 18, 2015
@jonas054 jonas054 added the bug label Jan 18, 2015
bbatsov added a commit that referenced this issue Jan 22, 2015
[Fix #1574] Don't auto-correct Hash.new into block braces
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