From: "rosenfeld (Rodrigo Rosenfeld Rosas)" Date: 2012-03-28T01:35:02+09:00 Subject: [ruby-core:43772] [ruby-trunk - Feature #6150] add Enumerable#grep_v Issue #6150 has been updated by rosenfeld (Rodrigo Rosenfeld Rosas). Of course, after Ruby support named parameters this could be acceptable too and I would always use it by passing the named parameter instead of just "true". ---------------------------------------- Feature #6150: add Enumerable#grep_v https://bugs.ruby-lang.org/issues/6150#change-25281 Author: sunaku (Suraj Kurapati) Status: Open Priority: Normal Assignee: Category: Target version: Please add a grep_v() method to Enumerable that behaves like the opposite of grep(). For example, if Enumerable#grep() was implemented like this: module Enumerable def grep pattern select {|x| pattern =~ x } end end then Enumerable#grep_v() would be implemented like this (select becomes reject): module Enumerable def grep_v pattern reject {|x| pattern =~ x } end end The method name "grep_v" comes from the "-v" option passed to grep(1). Thanks for your consideration. -- http://bugs.ruby-lang.org/