From ae2e8d364f685d4034f04900e0e3ad53cecc0e05 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 15 Sep 2022 01:31:34 +0900 Subject: [PATCH] [ruby/irb] `Dir.mktmpdir` creates a directory including the process ID https://github.com/ruby/irb/commit/a15f68ffdb --- test/irb/test_history.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb index 38a002d319..98d24f0880 100644 --- a/test/irb/test_history.rb +++ b/test/irb/test_history.rb @@ -162,7 +162,7 @@ module TestIRB backup_home = ENV["HOME"] backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME") IRB.conf[:SAVE_HISTORY] = 1 - Dir.mktmpdir("test_irb_history_#{$$}") do |tmpdir| + Dir.mktmpdir("test_irb_history_") do |tmpdir| ENV["HOME"] = tmpdir io = TestInputMethod.new io.class::HISTORY.clear @@ -188,7 +188,7 @@ module TestIRB backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME") IRB.conf[:LC_MESSAGES] = IRB::Locale.new actual_history = nil - Dir.mktmpdir("test_irb_history_#{$$}") do |tmpdir| + Dir.mktmpdir("test_irb_history_") do |tmpdir| ENV["HOME"] = tmpdir open(IRB.rc_file("_history"), "w") do |f| f.write(initial_irb_history)