Bug #864

String#include? regexp

Added by Michael Morgan about 3 years ago. Updated 10 months ago.

[ruby-core:20508]
Status:Rejected Start date:12/13/2008
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:core
Target version:1.9.0-5
ruby -v:

Description

For consistency, String#include? should be able to take a regexp as an argument. I realize that the return value of String#index(regexp) and String#match(regexp) could be used, but String#include?(regexp) would be both more readable and less resource-intensive.

History

Updated by Yukihiro Matsumoto about 3 years ago

  • Status changed from Open to Rejected
"readable" is subjective.  For me, strings do not "include" patterns.

Also available in: Atom PDF