Wrap multibyte split results without removed String extensions - #1677
Open
OskarEichler wants to merge 1 commit into
Open
OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wrap split pieces through the existing chars helper instead of calling the removed String#mb_chars extension. The documented split example currently raises NoMethodError without ActiveSupport.
Reproduction
Verification
bundle exec rake spec: 1,837 examples, zero failures, four existing pending, before and after this isolated patch on Ruby 4.0.6 via rbenv.mailwhen running Ruby > 2.0 #1095 removed core String extensions; this remaining call was not replaced. No internal split callers found, so this restores a public helper without claiming a production throughput improvement.Limitations and contribution policy
CONTRIBUTING.md and relevant source/specs were reviewed; a changelog entry is included. The requesting project’s explicit no-new-tests policy prevents repository spec additions/edits. This differs from upstream’s regression-spec request; runnable reproduction and external verification are supplied, and maintainer follow-up may be needed. Other Ruby versions/engines and production are unverified. An external bundle supplies the consumer’s patched network/mini_mime dependencies and benchmark for Ruby 4; no dependency upgrades or CI changes in this PR.
Breaking changes
No API signatures change. Results remain an array of character wrappers, now preserving the receiver class through the existing helper. This no longer depends on a globally added String#mb_chars implementation.