Skip to content

Scrub invalid UTF-8 bytes from debuggee output in tests#1174

Merged
k0kubun merged 1 commit intoruby:masterfrom
k0kubun:scrub-invalid-utf8
Mar 30, 2026
Merged

Scrub invalid UTF-8 bytes from debuggee output in tests#1174
k0kubun merged 1 commit intoruby:masterfrom
k0kubun:scrub-invalid-utf8

Conversation

@k0kubun
Copy link
Copy Markdown
Member

@k0kubun k0kubun commented Mar 30, 2026

Description

setup_remote_debuggee reads lines from PTY and matches them against regexps, but Regexp#=== raises ArgumentError when the line contains invalid UTF-8 byte sequences. This has been causing random CI failures: https://github.com/ruby/ruby/actions/runs/23754369209/job/69204936437

Use String#scrub to replace invalid bytes before matching.

setup_remote_debuggee reads lines from PTY and matches them against
regexps, but Regexp#=== raises ArgumentError when the line contains
invalid UTF-8 byte sequences. This has been causing random CI failures:
https://github.com/ruby/ruby/actions/runs/23754369209/job/69204936437

Use String#scrub to replace invalid bytes before matching.
@k0kubun k0kubun merged commit 2897eda into ruby:master Mar 30, 2026
33 of 36 checks passed
@k0kubun k0kubun deleted the scrub-invalid-utf8 branch March 30, 2026 18:37
k0kubun added a commit to ruby/ruby that referenced this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants