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

RedundantException should catch RuntimeError.new #3034

Closed
ptarjan opened this issue Apr 12, 2016 · 1 comment
Closed

RedundantException should catch RuntimeError.new #3034

ptarjan opened this issue Apr 12, 2016 · 1 comment

Comments

@ptarjan
Copy link
Contributor

ptarjan commented Apr 12, 2016

Expected behavior

Complains and autocorrects to raise 'message'

Actual behavior

$ rubocop a.rb
Inspecting 1 file
.

1 file inspected, no offenses detected
$ cat a.rb
raise RuntimeError.new('message')
$ cat .rubocop.yml
Style/RaiseArgs:
  EnforcedStyle: compact

Steps to reproduce the problem

Make the files as I showed above.

RuboCop version

$ rubocop -V
0.39.0 (using Parser 2.3.0.7, running on ruby 2.1.2 x86_64-darwin15.0)```
@jonas054
Copy link
Collaborator

jonas054 commented May 1, 2016

This issue was closed by mistake due to a faulty commit message.

@jonas054 jonas054 reopened this May 1, 2016
jonas054 added a commit to jonas054/rubocop that referenced this issue May 2, 2016
…tException

Until now we have only had support for reporting
`raise RuntimeError, msg`. Add support for reporting
`raise RuntimeError.new(msg)`.
@bbatsov bbatsov closed this as completed in 6247053 May 2, 2016
Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Oct 15, 2016
Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Oct 15, 2016
…tException (rubocop#3102)

Until now we have only had support for reporting
`raise RuntimeError, msg`. Add support for reporting
`raise RuntimeError.new(msg)`.
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

2 participants