From: David Alan Black Date: 2001-09-02T02:33:59+09:00 Subject: [ruby-talk:20676] Re: RCR: non-bang equivalent to []= Hello -- On Sun, 2 Sep 2001, Tobias Reif wrote: > Hi, > > RCR: > > I'm rying to modify specific items in a nested array, without modifying > the original. > I tried some variations, but most things that come to mind failed. > There are ways to achive what I want (I found some hack that works for me), > but I believe it would be good for the ease of use to introduce the > following: > > # > > []= is bang; > so > a version of []= that doesn't modify the receiver > would be cool. I'm sorry -- I don't understand. What exactly is supposed to happen? a = [1,2,3,4] a.non_bang_set(0) = 100 a # => [1,2,3,4] ? David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav