Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Gem::Package.new

new(gem, security_policy = nil)

Creates a new Gem::Package for the file at gem. gem can also be provided as an IO object.

If gem is an existing file in the old format a Gem::Package::Old will be returned.

See also .build .raw_spec #add_checksums also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1