ruby-changes:60947
From: Nobuyoshi <ko1@a...>
Date: Thu, 30 Apr 2020 22:58:55 +0900 (JST)
Subject: [ruby-changes:60947] 4a8acf4625 (master): [ruby/irb] Restore the default encodings
https://git.ruby-lang.org/ruby.git/commit/?id=4a8acf4625 From 4a8acf46258e1b6fb57e75e4461f9e4895064bda Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 30 Apr 2020 22:54:42 +0900 Subject: [ruby/irb] Restore the default encodings IRB::ReadlineInputMethod#initialize sets via IRB.set_encoding. diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb index daf6375..e50d036 100644 --- a/test/irb/test_cmd.rb +++ b/test/irb/test_cmd.rb @@ -17,12 +17,16 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L17 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/