From 7d603494990eab1e6273341a1d46c7d7ae15f041 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 12 May 2024 13:47:10 +0900 Subject: [PATCH] Clean up tmpdir --- test/irb/test_init.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb index 645678701..3207c2898 100644 --- a/test/irb/test_init.rb +++ b/test/irb/test_init.rb @@ -273,7 +273,7 @@ def setup @original_home = ENV["HOME"] @original_irbrc = ENV["IRBRC"] # To prevent the test from using the user's .irbrc file - ENV["HOME"] = Dir.mktmpdir + ENV["HOME"] = @home = Dir.mktmpdir IRB.instance_variable_set(:@existing_rc_name_generators, nil) super end @@ -283,6 +283,7 @@ def teardown ENV["IRBRC"] = @original_irbrc ENV["HOME"] = @original_home File.unlink(@irbrc) + Dir.rmdir(@home) end def test_irb_name_converts_non_string_values_to_string