From: Thomas Sawyer Date: 2011-11-17T10:09:24+09:00 Subject: [ruby-core:41087] [ruby-trunk - Feature #5644] add Enumerable#exclude? antonym Issue #5644 has been updated by Thomas Sawyer. Hey, a use for functors! module Kernel def not Functor.new do |op,*a,&b| !__send__(op,*a,&b) end end end some_list.not.include? some_file Nothing against Enumerable#exclude? though. Seems reasonable. ---------------------------------------- Feature #5644: add Enumerable#exclude? antonym http://redmine.ruby-lang.org/issues/5644 Author: Suraj Kurapati Status: Open Priority: Normal Assignee: Category: Target version: Please add Enumerable#exclude? as antonym of Enumerable#include? This allows me to construct Boolean expressions more pleasantly: if File.exist? some_file and not some_list.include? some_file Can be written as: if File.exist? some_file and some_list.exclude? some_file Thanks for your consideration. -- http://redmine.ruby-lang.org