1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

rubocop: fix offences of the Style/RaiseArgs cop

This commit is contained in:
Kyrylo Silin 2019-03-02 13:28:53 +02:00
parent b26ca78613
commit 287d820740
2 changed files with 1 additions and 9 deletions

View file

@ -314,14 +314,6 @@ Style/PerlBackrefs:
- 'lib/pry/method.rb'
- 'lib/pry/rubygem.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
Exclude:
- 'lib/pry/method.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantException:

View file

@ -530,7 +530,7 @@ class Pry
begin
code = Pry::Code.from_file(file).expression_at(line)
rescue SyntaxError => e
raise MethodSource::SourceNotFoundError.new(e.message)
raise MethodSource::SourceNotFoundError, e.message
end
strip_leading_whitespace(code)
end