From 287d82074040fd4db7f3c66848112a58490295f6 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Sat, 2 Mar 2019 13:28:53 +0200 Subject: [PATCH] rubocop: fix offences of the Style/RaiseArgs cop --- .rubocop_todo.yml | 8 -------- lib/pry/method.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index db969db5..bc639ccd 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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: diff --git a/lib/pry/method.rb b/lib/pry/method.rb index 131d7ba7..0eaf1204 100644 --- a/lib/pry/method.rb +++ b/lib/pry/method.rb @@ -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