Skip to content

Commit 7d60349

Browse files
committed
Clean up tmpdir
1 parent af8ef29 commit 7d60349

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/irb/test_init.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def setup
273273
@original_home = ENV["HOME"]
274274
@original_irbrc = ENV["IRBRC"]
275275
# To prevent the test from using the user's .irbrc file
276-
ENV["HOME"] = Dir.mktmpdir
276+
ENV["HOME"] = @home = Dir.mktmpdir
277277
IRB.instance_variable_set(:@existing_rc_name_generators, nil)
278278
super
279279
end
@@ -283,6 +283,7 @@ def teardown
283283
ENV["IRBRC"] = @original_irbrc
284284
ENV["HOME"] = @original_home
285285
File.unlink(@irbrc)
286+
Dir.rmdir(@home)
286287
end
287288

288289
def test_irb_name_converts_non_string_values_to_string

0 commit comments

Comments
 (0)