From: Eero Saynatkari Date: 2009-12-23T04:24:32+09:00 Subject: [ruby-core:27291] Re: select! Excerpts from rue's Private Feed: evanphx's message of Tue Dec 22 21:11:57 +0200 2009: > > On Dec 20, 2009, at 5:58 PM, Yukihiro Matsumoto wrote: > > > Hi, > > > > In message "Re: [ruby-core:27242] select!" > > on Sun, 20 Dec 2009 13:22:11 +0900, Roger Pack writes: > > > > |Is there any reason there's no select! > > > > Enumerables cannot have bang method, since they are not always > > mutable. The reason we don't have Array#select! is that I feel the > > word select means picking up elements, not removing non-selecting > > elements. But I once felt same way to map! and (English speaking) > > people persuaded me, so same thing could happen on select! as well. > > Array#prune is probably a better verb than #select!. #prune implies changing > the receiver into something by picking out what you want. Array#reject, #reject! These are almost always what are actually wanted when trying to use the nonexistent #select!. -- Magic is insufficiently advanced technology.