Fix Style/RedundantBegin cop.

This commit is contained in:
Robert Haines 2021-05-23 21:08:53 +01:00
parent 1b3f4bb7b8
commit efa23a84ba
2 changed files with 2 additions and 9 deletions

View File

@ -176,12 +176,6 @@ Style/OptionalBooleanParameter:
- 'lib/zip/file.rb'
- 'lib/zip/output_stream.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantBegin:
Exclude:
- 'lib/zip/dos_time.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantFileExtensionInRequire:

View File

@ -52,9 +52,8 @@ module Zip
day = (0b11111 & bin_dos_date)
month = (0b111100000 & bin_dos_date) >> 5
year = ((0b1111111000000000 & bin_dos_date) >> 9) + 1980
begin
local(year, month, day, hour, minute, second)
end
local(year, month, day, hour, minute, second)
end
if defined? JRUBY_VERSION && Gem::Version.new(JRUBY_VERSION) < '9.2.18.0'