1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Restore the default encodings

IRB::ReadlineInputMethod#initialize sets via IRB.set_encoding.
This commit is contained in:
Nobuyoshi Nakada 2020-04-30 22:54:42 +09:00
parent 9d1b272b01
commit 4a8acf4625
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -17,12 +17,16 @@ module TestIRB
Dir.chdir(@tmpdir)
@home_backup = ENV["HOME"]
ENV["HOME"] = @tmpdir
@default_encoding = [Encoding.default_external, Encoding.default_internal]
end
def teardown
ENV["HOME"] = @home_backup
Dir.chdir(@pwd)
FileUtils.rm_rf(@tmpdir)
EnvUtil.suppress_warning {
Encoding.default_external, Encoding.default_internal = *@default_encoding
}
end
def test_irb_info_multiline