Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate starts_with? and ends_with? for String core extensions #39152

Merged
merged 1 commit into from
May 5, 2020

Commits on May 5, 2020

  1. Deprecate starts_with? and ends_with? for String core extensions

    In the past, we sometimes hit missing `Symbol#start_with?` and
    `Symbol#end_with?`.
    
    rails@63256bc
    rails@a8e8129
    
    So I proposed `Symbol#start_with?` and `Symbol#end_with?` to allow duck
    typing that methods for String and Symbol, then now it is available in
    Ruby 2.7.
    
    https://bugs.ruby-lang.org/issues/16348
    
    Using `String#starts_with?` and `String#ends_with?` could not be gained
    that conveniency, so it is preferable to not use these in the future.
    kamipo committed May 5, 2020
    Configuration menu
    Copy the full SHA
    6a4395f View commit details
    Browse the repository at this point in the history