From: "matz (Yukihiro Matsumoto)" Date: 2012-04-10T18:25:05+09:00 Subject: [ruby-core:44257] [ruby-trunk - Feature #4086][Rejected] Feature request: add String#contain? and {Enumerable,Array}#contain? methods Issue #4086 has been updated by matz (Yukihiro Matsumoto). Status changed from Assigned to Rejected The proposal is ambiguous. Only valid point I see is String#contain? might be more intuitive than String#include?, but I don't see the need for method addition. Matz. ---------------------------------------- Feature #4086: Feature request: add String#contain? and {Enumerable,Array}#contain? methods https://bugs.ruby-lang.org/issues/4086#change-25792 Author: rogerdpack (Roger Pack) Status: Rejected Priority: Normal Assignee: matz (Yukihiro Matsumoto) 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://bugs.ruby-lang.org/