Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Gem.register_default_spec

register_default_spec(spec)

Register a Gem::Specification for default gem.

Two formats for the specification are supported:

  • MRI 2.0 style, where spec.files contains unprefixed require names. The spec’s filenames will be registered as-is.

  • New style, where spec.files contains files prefixed with paths from spec.require_paths. The prefixes are stripped before registering the spec’s filenames. Unprefixed files are omitted.

See also .refresh .ruby .read_binary .ruby_api_version also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0