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