From: David Vallner Date: 2006-02-16T10:53:19+09:00 Subject: Re: why does this freeze not work? Dňa Štvrtok 16 Február 2006 02:38 konsu napísal: > thank you. i understand. > > then attr_accessor seems to be the only way. but one can always re-open my > object and change the @id attribute... that is why i wanted to freeze the > reference variable and not the object itself. > The same person could also reopen your class, replace #initialize_copy, and then dup your frozen object and play with it to his heart's content. If you design your object to be immutable, odds are noone will reopen and hack at it just to spite your design. And if it does happen, it probably means there's something missing your API. David Vallner