Skip to content

Commit 5ce9259

Browse files
hsbtclaude
andcommitted
Keep the original PATH in the EnvUtil.find_executable test
Replacing PATH with only the build directory breaks the spawned ruby.exe on MSYS2 UCRT64, where the Windows DLL loader needs PATH to resolve libgmp-10.dll linked into the ruby DLL. Prepend the directory instead so the build ruby is still found first. ruby/ruby@9272524 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e04f0f5 commit 5ce9259

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/test_find_executable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_find_executable_returns_command_and_arguments
99
ruby = RbConfig.ruby
1010
command = File.basename(ruby, RbConfig::CONFIG["EXEEXT"])
1111
original_path = ENV["PATH"]
12-
ENV["PATH"] = File.dirname(ruby)
12+
ENV["PATH"] = File.dirname(ruby) + File::PATH_SEPARATOR + original_path
1313

1414
found = EnvUtil.find_executable(command, "--version") do |output|
1515
output.start_with?("ruby ")

0 commit comments

Comments
 (0)