Repository navigation
test_child_process: Exercise scrubbing during transcoding - #5626
Merged
Merged
Conversation
**Which issue(s) this PR fixes**: Fixes #4058 **What this PR does / why we need it**: Ruby 3.3 and later preserve binary input when the external encoding is ASCII-8BIT. Use EUC-JP input with an invalid byte to exercise scrubbing during transcoding to UTF-8. Verify that valid characters survive and that both default and custom replacement characters work. **Docs Changes**: None. **Release Note**: None. Signed-off-by: Takuro Ashie <ashie@clear-code.com> Assisted-by: GPT-6.1 Sol [Codex]
Watson1978
requested changes
Nov 10, 2026
Watson1978
left a comment
Contributor
There was a problem hiding this comment.
Thanks for bringing these tests back on Ruby 3.3 and later. Using EUC-JP input to exercise scrubbing during transcoding looks good to me. One request inline: the new input no longer covers undef: :replace.
**Which issue(s) this PR fixes**: Fixes #4058 **What this PR does / why we need it**: Add a well-formed EUC-JP sequence with no Unicode mapping alongside the invalid byte. Both scrubbing tests now cover the invalid and undefined conversion options. **Docs Changes**: None. **Release Note**: None. Assisted-by: GPT-6.1 Sol [Codex] Signed-off-by: Takuro Ashie <ashie@clear-code.com>
Watson1978
approved these changes
Nov 11, 2026
Watson1978
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the update. Both tests now cover invalid: :replace and undef: :replace. LGTM.
Watson1978
pushed a commit
that referenced
this pull request
Nov 15, 2026
…oding (#5626) (#5637) **Which issue(s) this PR fixes**: Backport #5626 Fixes #4058 **What this PR does / why we need it**: Ruby 3.3 and later preserve binary input when the external encoding is ASCII-8BIT. Use EUC-JP input containing both an invalid byte and a valid byte sequence with no Unicode mapping to exercise `invalid: :replace` and `undef: :replace` during transcoding to UTF-8. Verify that valid characters survive and that both default and custom replacement characters work. **Docs Changes**: None. **Release Note**: None. Assisted-by: GPT-6.1 Sol [Codex] Signed-off-by: Takuro Ashie <ashie@clear-code.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Takuro Ashie <ashie@clear-code.com>
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.
Which issue(s) this PR fixes:
Fixes #4058
What this PR does / why we need it:
Ruby 3.3 and later preserve binary input when the external encoding
is ASCII-8BIT. Use EUC-JP input containing both an invalid byte and a
valid byte sequence with no Unicode mapping to exercise
invalid: :replaceandundef: :replaceduring transcoding to UTF-8.Verify that valid characters survive and that both default and custom
replacement characters work.
Docs Changes:
None.
Release Note:
None.
Assisted-by: GPT-6.1 Sol [Codex]