Raised when there is an attempt to modify a frozen object.

[1, 2, 3].freeze << 4

raises the exception:

FrozenError: can't modify frozen Array
Class Methods

Construct a new FrozenError exception. If given the receiver parameter may subsequently be examined using the FrozenError#receiver method.

a = [].freeze
raise"can't modify frozen array", receiver: a)
Instance Methods

Return the receiver associated with this FrozenError exception.