Project

General

Profile

Bug #7757

String#start_with? and end_with? should accept Regexp

Added by marcandre (Marc-Andre Lafortune) almost 5 years ago. Updated almost 5 years ago.

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

Description

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

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

History

#1 [ruby-core:51762] Updated by marcandre (Marc-Andre Lafortune) almost 5 years ago

  • Status changed from Open to Closed

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

Also available in: Atom PDF