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/RedundantException cop

This commit is contained in:
Kyrylo Silin 2019-03-02 13:29:55 +02:00
parent 287d820740
commit 20f5356648
2 changed files with 1 additions and 7 deletions

View file

@ -314,12 +314,6 @@ Style/PerlBackrefs:
- 'lib/pry/method.rb'
- 'lib/pry/rubygem.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantException:
Exclude:
- 'lib/pry/repl_file_loader.rb'
# Offense count: 8
# Cop supports --auto-correct.
Style/RedundantParentheses:

View file

@ -12,7 +12,7 @@ class Pry
class REPLFileLoader
def initialize(file_name)
full_name = File.expand_path(file_name)
raise RuntimeError, "No such file: #{full_name}" unless File.exist?(full_name)
raise "No such file: #{full_name}" unless File.exist?(full_name)
define_additional_commands
@content = File.read(full_name)