From: David Masover Date: 2009-12-16T10:18:09+09:00 Subject: Re: select! On Tuesday 15 December 2009 02:51:56 pm Ryan Davis wrote: > On Dec 15, 2009, at 10:35 , Roger Pack wrote: > > Is there any reason there's no select! > > Perhaps because `select! x` is as simple as `reject! not x`? For consistency's sake, I'd still suggest the standard library should provide something like: module Enumerable def select! reject! {|*args| ! yield(*args) } end def reject! select! {|*args| ! yield(*args) } end end Not exactly that, though -- the obvious problem is that if neither select! no reject! is overridden, you'd want a NoMethodError instead of a stack overflow.