Skip to content
On this page

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

class · Ruby 4.1

FrozenError

< RuntimeError 1 instance methods 1 class methods

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

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

raises the exception:

FrozenError: can't modify frozen Array

Class methods 1

Instance methods 1