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:
parent
287d820740
commit
20f5356648
2 changed files with 1 additions and 7 deletions
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue