Project

General

Profile

Actions

Feature #16348

closed

Proposal: Symbol#start_with?, Symbol#end_with?, and Symbol#include?

Added by kamipo (Ryuta Kamizono) about 5 years ago. Updated about 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:50862]

Description

When replacing #match? to #start_with?, #end_with?, and #include? for some reason (address to https://bugs.ruby-lang.org/issues/13083 etc), we frequently hit missing Symbol#start_with?, Symbol#end_with?, and Symbol#include? in spite of Symbol#match? exists.

https://github.com/rails/rails/commit/63256bc5d7dd77b2cce82df46c53249dab2dc2a8
https://github.com/rails/rails/commit/a8e812964d711fa03843e76ae50f5ff81cdc9e00

Is this inconsistency intentional?
If not so, Symbol#start_with?, Symbol#end_with?, and Symbol#include? prevents such like an issue.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0