Skip to content

Commit d89f241

Browse files
committed
Style/SignalException
1 parent b38d0c8 commit d89f241

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,6 @@ Style/GlobalVars:
7878
Style/NumericLiterals:
7979
MinDigits: 20
8080

81-
# Offense count: 2
82-
# Cop supports --auto-correct.
83-
# Configuration parameters: EnforcedStyle, SupportedStyles.
84-
# SupportedStyles: only_raise, only_fail, semantic
85-
Style/SignalException:
86-
Exclude:
87-
- 'lib/mysql2/client.rb'
88-
- 'spec/em/em_spec.rb'
89-
9081
# Offense count: 726
9182
# Cop supports --auto-correct.
9283
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.

lib/mysql2/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def self.default_query_options
2121
end
2222

2323
def initialize(opts = {})
24-
fail Mysql2::Error, "Options parameter must be a Hash" unless opts.is_a? Hash
24+
raise Mysql2::Error, "Options parameter must be a Hash" unless opts.is_a? Hash
2525
opts = Mysql2::Util.key_hash_as_symbols(opts)
2626
@read_timeout = nil
2727
@query_options = self.class.default_query_options.dup

spec/em/em_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
defer = client.query "SELECT sleep(0.1) as first_query"
5757
defer.callback do
5858
client.close
59-
fail 'some error'
59+
raise 'some error'
6060
end
6161
defer.errback do
6262
# This _shouldn't_ be run, but it needed to prevent the specs from

0 commit comments

Comments
 (0)