Skip to content

SyntaxSuggest 3.0.0 leaks raw invalid bytes into stderr when source has invalid encoding #258

@hsbt

Description

@hsbt

Since 3.0.0 removed CleanDocument#clean_sweep, sources that contain bytes invalid in their encoding are no longer rejected internally — the raw bytes end up in the annotation. Previously clean_sweep raised ArgumentError and the rescue in core_ext.rb produced a clean fallback.

Under LC_ALL=C, captured error output becomes a US-ASCII string with invalid bytes — any regex match on it raises ArgumentError: invalid byte sequence in US-ASCII. This broke spec/ruby/language/source_encoding_spec.rb on three Ruby CI platforms:

I added workaround for this at ruby/ruby@f45bb9b

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions