From: "T. Onoma" Date: 2003-12-14T15:14:44+09:00 Subject: Re: inplace assignment On Sunday 14 December 2003 05:51 am, Hal Fulton wrote: > T. Onoma wrote: > > is there anyway, anyway at all, ugly hacks accepted, of doing inplace > > assignment in Ruby? > > Not sure what you mean, can you give an example from > some other language? Or just explain? > > Hal Sure, q = 1 p q.__id__ # => 3 q = 2 p q.__id__ # => 5 (want this to still be 3) In other words I want to change what q "contains" rather then alter its reference. With an array for example you can do that with #replace. In particular I'm interesed in doing this with constants. -- T.