Fix Lint/LiteralAsCondition cop.
This fixes Style/InfiniteLoop as a side-effect.
This commit is contained in:
parent
20743a53b2
commit
b528cae084
|
@ -31,11 +31,6 @@ Layout/HashAlignment:
|
|||
- 'lib/zip/file.rb'
|
||||
- 'rubyzip.gemspec'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/LiteralAsCondition:
|
||||
Exclude:
|
||||
- 'lib/zip/ioextras/abstract_input_stream.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/RescueException:
|
||||
Exclude:
|
||||
|
@ -283,12 +278,6 @@ Style/IfUnlessModifier:
|
|||
- 'lib/zip/pass_thru_decompressor.rb'
|
||||
- 'lib/zip/streamable_stream.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/InfiniteLoop:
|
||||
Exclude:
|
||||
- 'lib/zip/ioextras/abstract_input_stream.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Style/MixinUsage:
|
||||
Exclude:
|
||||
|
|
|
@ -101,7 +101,7 @@ module Zip
|
|||
end
|
||||
|
||||
def each_line(a_sep_string = $/)
|
||||
yield readline(a_sep_string) while true
|
||||
loop { yield readline(a_sep_string) }
|
||||
rescue EOFError
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue