Skip to content

Commit f45bb9b

Browse files
hsbtclaude
andcommitted
Force binary encoding before matching in source_encoding_spec
After the syntax_suggest sync at 23ea206, raw source bytes leak into SyntaxError output, which breaks the regex match on CI machines running under LC_ALL=C where ruby_exe returns a US-ASCII string. https://rubyci.s3.amazonaws.com/debian/ruby-master/log/20260420T003003Z.fail.html.gz https://rubyci.s3.amazonaws.com/s390x/ruby-master/log/20260419T230004Z.fail.html.gz https://rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20260419T233005Z.fail.html.gz Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6e9ad14 commit f45bb9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

spec/ruby/language/source_encoding_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
touch(path, "wb") { |f| f.write source }
3131
begin
32-
ruby_exe(path, args: "2>&1", exit_status: 1).should =~ /invalid multibyte char/
32+
ruby_exe(path, args: "2>&1", exit_status: 1).b.should =~ /invalid multibyte char/
3333
ensure
3434
rm_r path
3535
end
@@ -51,7 +51,7 @@
5151

5252
touch(path, "wb") { |f| f.write source }
5353
begin
54-
ruby_exe(path, args: "2>&1", exit_status: 1).should =~ /invalid multibyte char/
54+
ruby_exe(path, args: "2>&1", exit_status: 1).b.should =~ /invalid multibyte char/
5555
ensure
5656
rm_r path
5757
end

0 commit comments

Comments
 (0)