instance method
Gem::Package::TarReader::Entry#close
close
lib/rubygems/package/tar_reader/entry.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/package/tar_reader/entry.rb, line 59
def close
return if closed?
# Seek to the end of the entry if it wasn't fully read
seek(0, IO::SEEK_END)
# discard trailing zeros
skip = (512 - (@header.size % 512)) % 512
@io.read(skip)
@closed = true
nil
end
Closes the tar entry