From: itsme213 Date: 2004-12-12T08:32:24+09:00 Subject: Re: Freezing Variable Assignment "Austin Ziegler" wrote > >> I don't necessarily consider the object to have a virtual state. > > But I believe that _is_ what is intended by "freeze", and I think > > others comments in this thread bear that out. > > I get just the opposite, except from you. Please tell me how you would implement MyHash#freeze below, assuming it has other hash-like methods and I want a frozen myhash to behave like a frozen hash. class MyHash attr_accessor :keys, :values def initialize *args @keys = [] @values = [] # ... other stuff end def freeze # ?? end end Then perhaps you can help me understand how your freeze is doing something other than freeze a "virtual state" of myhash, something a bit deeper than the values of MyHash's immediate instance variables. Thanks.