An immutable value cannot be changed after creation. Ruby symbols are immutable by nature; most other Ruby objects can be changed unless they are frozen. section 8.2.1 section 16.2.1
Calling `freeze` prevents changes to that object, and `frozen?` checks its status. Freezing an object does not guarantee that all of its attributes are immutable, so do not assume nested state is protected. section 16.2.1
>> the_unseen = Record.new("Quasimoto", "The Unseen", 2000, 3.5)
>> the_unseen.rating = 4.5
=> 4.5
>> the_unseen.freeze
>> the_unseen.rating.frozen?
=> true
>> the_unseen.artist = "Madlib"
=> can't modify frozen #<Class:#<Record:0x0000000131dbfa60>>:
➥#<Record:0x0000000131dbfa60 @artist="Quasimoto", @title="The Unseen",
➥@year=2000, @rating=4.5> (FrozenError)
The Record example shows a mutable object before freezing and a rejected attribute assignment afterward. section 16.2
Frozen string literals offer a practical case: duplicate literals can share an object, while `dup`, `String.new`, or unary `+` can provide a mutable string. Frozen behavior is not absolute, and frozen-string support may vary across Ruby releases. section 16.2.2























