summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2026-04-20 11:06:28 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2026-04-20 11:09:13 +0900
commitf45bb9ba36cff72eff1bf0c0817a023843a1be34 (patch)
tree574fdc955d902d198e090a6c9e4cd50cd7e4d91f
parent6e9ad14db9260090aa5f055d6ed123632efdf75b (diff)
Force binary encoding before matching in source_encoding_spec
After the syntax_suggest sync at 23ea206a58d, 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>
-rw-r--r--spec/ruby/language/source_encoding_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/language/source_encoding_spec.rb b/spec/ruby/language/source_encoding_spec.rb
index 7135bc0a70..5a243fa2c3 100644
--- a/spec/ruby/language/source_encoding_spec.rb
+++ b/spec/ruby/language/source_encoding_spec.rb
@@ -29,7 +29,7 @@ describe "Source files" do
touch(path, "wb") { |f| f.write source }
begin
- ruby_exe(path, args: "2>&1", exit_status: 1).should =~ /invalid multibyte char/
+ ruby_exe(path, args: "2>&1", exit_status: 1).b.should =~ /invalid multibyte char/
ensure
rm_r path
end
@@ -51,7 +51,7 @@ describe "Source files" do
touch(path, "wb") { |f| f.write source }
begin
- ruby_exe(path, args: "2>&1", exit_status: 1).should =~ /invalid multibyte char/
+ ruby_exe(path, args: "2>&1", exit_status: 1).b.should =~ /invalid multibyte char/
ensure
rm_r path
end