Forum: Ruby-core [ruby-trunk - Bug #7757][Open] String#start_with? and end_with? should accept Regexp

Posted by marcandre (Marc-Andre Lafortune) (Guest)
on 2013-01-30 17:22
(Received via mailing list)
Issue #7757 has been reported by marcandre (Marc-Andre Lafortune).

----------------------------------------
Bug #7757: String#start_with? and end_with? should accept Regexp
https://bugs.ruby-lang.org/issues/7757

Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version: next minor
ruby -v: r38984


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

    "hello".start_with? /h/ # => true, not a TypeError
Posted by marcandre (Marc-Andre Lafortune) (Guest)
on 2013-01-30 17:25
(Received via mailing list)
Issue #7757 has been updated by marcandre (Marc-Andre Lafortune).

Status changed from Open to Closed

Dupe, see #3388, sorry.
Need a ram upgrade.
----------------------------------------
Bug #7757: String#start_with? and end_with? should accept Regexp
https://bugs.ruby-lang.org/issues/7757#change-35732

Author: marcandre (Marc-Andre Lafortune)
Status: Closed
Priority: Normal
Assignee:
Category: core
Target version: next minor
ruby -v: r38984


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

    "hello".start_with? /h/ # => true, not a TypeError
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.