"Austin Ziegler" <halostatue / gmail.com> wrote in message
>   a = Struct.new("Effable", :a, :b).new
>   a.a = "abcdef"
>   a.b = %w(a b c d e f)
>   a.freeze
>   a.a = "ghijkl"        # raises error
>   a.a.gsub!(/a/, 'z')   # no error
>   a.b[0] = 'z'          # no error
>
> Freeze isn't necessarily recursive.

Correct. All instance variables of the object are frozen, not the objects
they refer to.

One of the nice things about a pure oo language like Ruby or Smalltalk is
the clean model of  state as an object graph: a set of objects and their
links via instance variables. The only possible changes of state are (a)
changes to links via deleting links or creating links (b) creation of new
objects. Freezing then is about prohibiting certain link changes.