Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. 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']