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

RedundantReturn autocorrect don't check that changed string it's valid ruby code #2029

Closed
akolomiychuk opened this issue Jul 10, 2015 · 1 comment · Fixed by #2039
Closed
Labels

Comments

@akolomiychuk
Copy link

Example

def foo
  return :x => 1, :y => 2
end

Expected result

def foo
  { :x => 1, :y => 2 }
end

Actual result (syntax error)

def foo
  :x => 1, :y =>2
end
@akolomiychuk
Copy link
Author

Rubocop version: 0.32.1 (using Parser 2.3.0.pre.2, running on ruby 2.2.0 x86_64-linux)

@bbatsov bbatsov added the bug label Jul 10, 2015
bbatsov added a commit that referenced this issue Jul 16, 2015
[Fix #2029] Style/RedundantReturn auto-corrects implicit hashes
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