class Bundler::CompactIndexClient::CacheFile

def open(write_mode = "wb", perm = @perm, &block)

Open the temp file for writing, reusing original permissions, yielding the IO object.
def open(write_mode = "wb", perm = @perm, &block)
  raise ClosedError, "Cannot reopen closed file" if @closed
  SharedHelpers.filesystem_access(path, :write) do
    path.open(write_mode, perm) do |f|
      yield digests? ? Gem::Package::DigestIO.new(f, @digests) : f
    end
  end
end