From: "David A. Black" Date: 2001-09-04T00:53:48+09:00 Subject: [ruby-talk:20786] Re: RCR: non-bang equivalent to []= Hello -- On Mon, 3 Sep 2001, Tobias Reif wrote: > Kevin, > > > > Many of the Array methods are already bang-type methods, > > even though they don't have the bang: clear, delete, > > delete_at, delete_if, fill, pop, push, replace, shift, > > unshift. > > > I'd like to have bang and non-bang versions of each and every method. > The names should just differ in the !, like collect and collect! Except... each and every method would include #max, #first, #last, and some others where the bang/non-bang distinction wouldn't be meaningful. Unless you mean that you think that every method should have a version where it operates on a copy.... but there can't be any point in copying an array as a side effect of, say, determining its first element. David -- David Alan Black usually dblack@candle.superlink.net writing from dblack@saturn.superlink.net