diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index addf875..ae36271 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -109,7 +109,6 @@ Style/NumericPredicate: # AllowedMethods: respond_to_missing? Style/OptionalBooleanParameter: Exclude: - - 'lib/zip/entry.rb' - 'lib/zip/file.rb' - 'lib/zip/file_split.rb' - 'lib/zip/output_stream.rb' diff --git a/lib/zip/entry.rb b/lib/zip/entry.rb index 749563d..11ddb85 100644 --- a/lib/zip/entry.rb +++ b/lib/zip/entry.rb @@ -333,7 +333,7 @@ module Zip @extra ? @extra.local_size : 0].pack('VvvvvvVVVvv') end - def write_local_entry(io, rewrite = false) #:nodoc:all + def write_local_entry(io, rewrite: false) #:nodoc:all prep_zip64_extra(true) verify_local_header_size! if rewrite @local_header_offset = io.tell diff --git a/lib/zip/output_stream.rb b/lib/zip/output_stream.rb index a648a3d..2150dfb 100644 --- a/lib/zip/output_stream.rb +++ b/lib/zip/output_stream.rb @@ -177,7 +177,7 @@ module Zip pos = @output_stream.pos @entry_set.each do |entry| @output_stream.pos = entry.local_header_offset - entry.write_local_entry(@output_stream, true) + entry.write_local_entry(@output_stream, rewrite: true) end @output_stream.pos = pos end diff --git a/test/local_entry_test.rb b/test/local_entry_test.rb index 212c91a..15c367a 100644 --- a/test/local_entry_test.rb +++ b/test/local_entry_test.rb @@ -126,7 +126,7 @@ class ZipLocalEntryTest < MiniTest::Test buf2 = StringIO.new entry.size = 0x123456789ABCDEF0 entry.compressed_size = 0x0123456789ABCDEF - entry.write_local_entry(buf2, true) + entry.write_local_entry(buf2, rewrite: true) refute_nil(entry.extra['Zip64']) refute_equal(buf1.size, 0) assert_equal(buf1.size, buf2.size) # it can't grow, or we'd clobber file data