Bug #7757

String#start_with? and end_with? should accept Regexp

Added by Marc-Andre Lafortune about 1 year ago. Updated about 1 year ago.

[ruby-core:51761]
Status:Closed
Priority:Normal
Assignee:-
Category:core
Target version:next minor
ruby -v:r38984 Backport:

Description

As suggested by Ilya in #5536, the following should work:

"hello".start_with? /h/ # => true, not a TypeError

History

#1 Updated by Marc-Andre Lafortune about 1 year ago

  • Status changed from Open to Closed

Dupe, see #3388, sorry.
Need a ram upgrade.

Also available in: Atom PDF