Issue #4086 has been updated by Roger Pack.

File add_contain_method.diff added

No negative feedback so I created a patch for it.  It would be great to have it reviewed before next feature freeze, whoever may do that.

Thanks!
-roger-
----------------------------------------
Feature #4086: Feature request: add String#contain? and {Enumerable,Array}#contain? methods
http://redmine.ruby-lang.org/issues/4086

Author: Roger Pack
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


=begin
 Hello all.
 
 I debated this suggestion previously on ruby talk ( http://www.ruby-forum.com/topic/217473 ) and nobody seemed to have negative feedback, so here goes...
 
 Currently Strings and Enumerables have a contain? method for searching for if one includes another.
 
 I tend to "reach for" an include? method for the same, since it makes more sense in my head.  For instance "is this string included in that one? Does this array include this member?"
 
 Since ruby is typically not averse to several ways to do the same thing (example: Array#{detect,find}, Array#{collect,map} etc.) I propose that 
 new methods be added of String#contain? and {Enumerable,Array}#contain?
 
 I'd be happy to code up a patch if it had a chance of being accepted.
 Feedback welcome.
 Cheers!
 -roger
=end



-- 
http://redmine.ruby-lang.org