Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Package#initialize
initialize(gem, security_policy)
lib/rubygems/package.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/package.rb, line 241
def initialize(gem, security_policy) # :notnew:
require "zlib"
@gem = gem
@build_time = Gem.source_date_epoch
@checksums = {}
@contents = nil
@digests = Hash.new {|h, algorithm| h[algorithm] = {} }
@files = nil
@security_policy = security_policy
@signatures = {}
@signer = nil
@spec = nil
end
Creates a new package that will read or write to the file gem.
See also
#gzip_to
#limit_read
#extract_files
#normalized_required_rubygems_version
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0