From db8eb88551ae3bee4f767a86918b8f5ce62e6247 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 29 Oct 2026 19:03:18 +0900 Subject: [PATCH] Read the dir output for the symlink check as binary cmd.exe writes it in the console code page, which is CP932 in an ssh session, while IO.popen tags it as UTF-8 on Windows, so the regexp match raised ArgumentError. Co-Authored-By: Claude Opus 5.5 --- test/fileutils/test_fileutils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 1a93c01..eafb131 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -1049,7 +1049,7 @@ def test_ln_s_relative_to_symlinked_directory lnfname = File.join(dest, 'zsh') if /mingw|mswin/ =~ RUBY_PLATFORM - unless // =~ IO.popen({"DIRCMD"=>nil}, "dir zsh", chdir: File.dirname(dest), &:read) + unless // =~ IO.popen({"DIRCMD"=>nil}, "dir zsh", "rb", chdir: File.dirname(dest), &:read) omit "[Bug #22338]" end end