From 7f2c77d51a384353ad4d6940652ebb1caf8c77d3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 12 Jun 2026 09:52:14 +0900 Subject: [PATCH] Add sleep to USE_TMP_HOME check for macOS C.f. https://github.com/ruby/ruby/pull/12691 --- test/support/console_test_case.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/support/console_test_case.rb b/test/support/console_test_case.rb index 187506e99..b174f9f96 100644 --- a/test/support/console_test_case.rb +++ b/test/support/console_test_case.rb @@ -18,7 +18,7 @@ class ConsoleTestCase < TestCase pwd = Dir.pwd ruby = ENV['RUBY'] || RbConfig.ruby home_cannot_change = false - PTY.spawn({ "HOME" => pwd }, ruby, '-e', 'puts ENV["HOME"]') do |r,| + PTY.spawn({ "HOME" => pwd }, ruby, '-e', 'puts ENV["HOME"]; sleep 0.1') do |r,| home_cannot_change = r.gets.chomp != pwd end !home_cannot_change