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
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. Previouslyclean_sweepraisedArgumentErrorand the rescue incore_ext.rbproduced a clean fallback.Under
LC_ALL=C, captured error output becomes aUS-ASCIIstring with invalid bytes — any regex match on it raisesArgumentError: invalid byte sequence in US-ASCII. This brokespec/ruby/language/source_encoding_spec.rbon three Ruby CI platforms:I added workaround for this at ruby/ruby@f45bb9b