Project

General

Profile

Actions

Bug #7757

closed

String#start_with? and end_with? should accept Regexp

Added by marcandre (Marc-Andre Lafortune) over 9 years ago. Updated over 9 years ago.

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

Description

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

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

Also available in: Atom PDF