From: Saku Ytti Date: 2008-04-12T02:26:49+09:00 Subject: Re: delete_if, select and (lack of) delete_if!, self.POLS == false On (2008-04-12 02:08 +0900), Robert Dober wrote: > No, I agree with you but OTOH not many seem to see the need for this > and the community is rather pragmatic about these things. > I would prefer to have a reject and a reject! but I am pragmatic about > democracy ;), and a large majority seems not to see the need for this. > Now I would love to stand corrected of course ;). Hmm yeah, so you'd name them something like this? class Array;def reject!(&blk) reject(&blk).each{|e|delete e};end def select!(&blk) select(&blk).each{|e|delete e};end;end so reject! does mutating reject and returns non-rejected and select! does mutating select and returns non-selected. So if I'd want the 'select' behaviour I was missing, I'd just call reject! Upside of this solution is, it wouldn't tinker with anything existing. But still not sure if people commonly want something like this. -- ++ytti