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)
|
Dir.chdir(@tmpdir)
|
||||||
@home_backup = ENV["HOME"]
|
@home_backup = ENV["HOME"]
|
||||||
ENV["HOME"] = @tmpdir
|
ENV["HOME"] = @tmpdir
|
||||||
|
@default_encoding = [Encoding.default_external, Encoding.default_internal]
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
ENV["HOME"] = @home_backup
|
ENV["HOME"] = @home_backup
|
||||||
Dir.chdir(@pwd)
|
Dir.chdir(@pwd)
|
||||||
FileUtils.rm_rf(@tmpdir)
|
FileUtils.rm_rf(@tmpdir)
|
||||||
|
EnvUtil.suppress_warning {
|
||||||
|
Encoding.default_external, Encoding.default_internal = *@default_encoding
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_irb_info_multiline
|
def test_irb_info_multiline
|
||||||
|
|
Loading…
Reference in a new issue