[ruby/irb] Cleanup irbrc generator cache always at teardown

(https://github.com/ruby/irb/pull/968)

https://github.com/ruby/irb/commit/905184ff9c
This commit is contained in:
tomoya ishida 2024-06-12 16:47:58 +09:00 committed by git
parent 2eb31a6254
commit c56d0adfa6

View File

@ -274,7 +274,6 @@ module TestIRB
@original_irbrc = ENV["IRBRC"] @original_irbrc = ENV["IRBRC"]
# To prevent the test from using the user's .irbrc file # To prevent the test from using the user's .irbrc file
ENV["HOME"] = @home = Dir.mktmpdir ENV["HOME"] = @home = Dir.mktmpdir
IRB.instance_variable_set(:@existing_rc_name_generators, nil)
super super
end end
@ -284,6 +283,7 @@ module TestIRB
ENV["HOME"] = @original_home ENV["HOME"] = @original_home
File.unlink(@irbrc) File.unlink(@irbrc)
Dir.rmdir(@home) Dir.rmdir(@home)
IRB.instance_variable_set(:@existing_rc_name_generators, nil)
end end
def test_irb_name_converts_non_string_values_to_string def test_irb_name_converts_non_string_values_to_string