[前][次][番号順一覧][スレッド一覧]

ruby-changes:73565

From: Nobuyoshi <ko1@a...>
Date: Thu, 15 Sep 2022 08:26:10 +0900 (JST)
Subject: [ruby-changes:73565] ae2e8d364f (master): [ruby/irb] `Dir.mktmpdir` creates a directory including the process ID

https://git.ruby-lang.org/ruby.git/commit/?id=ae2e8d364f

From ae2e8d364f685d4034f04900e0e3ad53cecc0e05 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 15 Sep 2022 01:31:34 +0900
Subject: [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 https://github.com/ruby/ruby/blob/trunk/test/irb/test_history.rb#L162
       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 https://github.com/ruby/ruby/blob/trunk/test/irb/test_history.rb#L188
       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)
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]