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:
parent
9d1b272b01
commit
4a8acf4625
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue