From: Markus Koenig Date: 2005-07-27T11:06:14+09:00 Subject: Re: An array updatable? Joe Cheng schrieb: Joe Cheng wrote: > How about this? > > class A > attr :name > > def cars > @cars.dup.freeze > end > > def initialize(name) > @name = name > @cars = Array.new() > end > end foo = A.new # ... foo.cars.first.replace 'xyzzy' ;)