Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Gem::Package#build_content_addressable_file

build_content_addressable_file(skip_validation = false, strict_validation = false)

Builds this package and writes it to a content-addressable file name derived from the SHA-256 digest of the gem contents, for example “example-1.0-01234567.gem”. Returns the written file name.

The spec is validated for content addressing. Its required_ruby_version determines the Ruby ABI, while its required_rubygems_version is constrained before building.