Skip to content

Commit 03b2587

Browse files
committed
Style/GuardClause
1 parent 972585e commit 03b2587

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ Style/GlobalVars:
7272
Exclude:
7373
- 'ext/mysql2/extconf.rb'
7474

75-
# Offense count: 1
76-
# Configuration parameters: MinBodyLength.
77-
Style/GuardClause:
78-
Exclude:
79-
- 'spec/mysql2/client_spec.rb'
80-
8175
# Offense count: 175
8276
# Cop supports --auto-correct.
8377
# Configuration parameters: SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.

spec/mysql2/client_spec.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -681,13 +681,7 @@ def run_gc
681681

682682
io_wrapper = IO.for_fd(@client.socket, :autoclose => false)
683683
loops = 0
684-
loop do
685-
if IO.select([io_wrapper], nil, nil, 0.05)
686-
break
687-
else
688-
loops += 1
689-
end
690-
end
684+
loops += 1 until IO.select([io_wrapper], nil, nil, 0.05)
691685

692686
# make sure we waited some period of time
693687
expect(loops >= 1).to be true

0 commit comments

Comments
 (0)