diff options
Diffstat (limited to 'rubocop/cop/ban_catch_throw.rb')
-rw-r--r-- | rubocop/cop/ban_catch_throw.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/ban_catch_throw.rb b/rubocop/cop/ban_catch_throw.rb index 42301d5512f..3f215eb3140 100644 --- a/rubocop/cop/ban_catch_throw.rb +++ b/rubocop/cop/ban_catch_throw.rb @@ -19,7 +19,7 @@ module RuboCop # # ... # end # - class BanCatchThrow < RuboCop::Cop::Cop + class BanCatchThrow < RuboCop::Cop::Base MSG = "Do not use catch or throw unless a gem's API demands it." def on_send(node) @@ -27,7 +27,7 @@ module RuboCop return unless receiver.nil? && %i[catch throw].include?(method_name) - add_offense(node, location: :expression) + add_offense(node) end end end |