Fix Style/Next cop.
This commit is contained in:
parent
7978abb85e
commit
2f993221c0
|
@ -162,14 +162,6 @@ Style/ModuleFunction:
|
|||
Style/MutableConstant:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, MinBodyLength.
|
||||
# SupportedStyles: skip_modifier_ifs, always
|
||||
Style/Next:
|
||||
Exclude:
|
||||
- 'lib/zip/entry.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedOctalStyle.
|
||||
|
|
|
@ -625,13 +625,13 @@ module Zip
|
|||
while (buf = is.sysread(::Zip::Decompressor::CHUNK_SIZE, buf))
|
||||
os << buf
|
||||
bytes_written += buf.bytesize
|
||||
if bytes_written > size && !warned
|
||||
message = "entry '#{name}' should be #{size}B, but is larger when inflated."
|
||||
raise ::Zip::EntrySizeError, message if ::Zip.validate_entry_sizes
|
||||
next unless bytes_written > size && !warned
|
||||
|
||||
warn "WARNING: #{message}"
|
||||
warned = true
|
||||
end
|
||||
message = "entry '#{name}' should be #{size}B, but is larger when inflated."
|
||||
raise ::Zip::EntrySizeError, message if ::Zip.validate_entry_sizes
|
||||
|
||||
warn "WARNING: #{message}"
|
||||
warned = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue