Skip to content

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

instance method

Gem::Specification#licenses=

licenses=(licenses)

The license(s) for the library.

Each license must be a short name, no more than 64 characters.

This should just be the name of your license. The full text of the license should be inside of the gem when you build it.

See license= for more discussion

Usage:

Example
spec.licenses = ['MIT', 'GPL-2.0']