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'
|
- 'lib/zip/file.rb'
|
||||||
- 'rubyzip.gemspec'
|
- 'rubyzip.gemspec'
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
Lint/LiteralAsCondition:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/zip/ioextras/abstract_input_stream.rb'
|
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
Lint/RescueException:
|
Lint/RescueException:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
@ -283,12 +278,6 @@ Style/IfUnlessModifier:
|
||||||
- 'lib/zip/pass_thru_decompressor.rb'
|
- 'lib/zip/pass_thru_decompressor.rb'
|
||||||
- 'lib/zip/streamable_stream.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
|
# Offense count: 1
|
||||||
Style/MixinUsage:
|
Style/MixinUsage:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|
|
@ -101,7 +101,7 @@ module Zip
|
||||||
end
|
end
|
||||||
|
|
||||||
def each_line(a_sep_string = $/)
|
def each_line(a_sep_string = $/)
|
||||||
yield readline(a_sep_string) while true
|
loop { yield readline(a_sep_string) }
|
||||||
rescue EOFError
|
rescue EOFError
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue