diff options
| author | John Hawthorn <john@hawthorn.email> | 2023-08-31 15:12:47 -0700 |
|---|---|---|
| committer | John Hawthorn <john@hawthorn.email> | 2023-09-01 16:23:28 -0700 |
| commit | d89b15cdce8a2fa36fc2a150551f0dd8e58814d7 (patch) | |
| tree | 789da818c90a706c659de182207e02a9cc5b1e40 /include/ruby | |
| parent | 2ca0f01015d076d966ab1b0f28700a4424b86da6 (diff) | |
Use end of char boundary in start_with?
Previously we used the next character following the found prefix to
determine if the match ended on a broken character.
This had caused surprising behaviour when a valid character was followed
by a UTF-8 continuation byte.
This commit changes the behaviour to instead look for the end of the
last character in the prefix.
[Bug #19784]
Co-authored-by: ywenc <ywenc@github.com>
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8348
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions
