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

test/irb/test_cmd.rb: clear IRB.@CONF on setup

It caches a path to .irbrc file, which has caused random failure:

```
  1) Failure:
TestIRB::ExtendCommand#test_irb_info_multiline [/home/mame/work/ruby/test/irb/test_cmd.rb:49]:
Expected /
        Ruby\sversion: .+\n
        IRB\sversion:\sirb .+\n
        InputMethod:\sReidlineInputMethod\swith\sReline .+ and .+\n
        \.irbrc\spath: .+
      /x to match "Ruby version: 2.8.0\n" +
"IRB version: irb 1.2.3 (2020-02-15)\n" +
"InputMethod: ReidlineInputMethod with Reline 0.1.4 and /tmp/test_reline_config_155659/.inputrc\n".
```
This commit is contained in:
Yusuke Endoh 2020-05-08 00:15:01 +09:00
parent 00a3b8f730
commit 3b147c4213

View file

@ -18,6 +18,7 @@ module TestIRB
@home_backup = ENV["HOME"]
ENV["HOME"] = @tmpdir
@default_encoding = [Encoding.default_external, Encoding.default_internal]
IRB.instance_variable_get(:@CONF).clear
end
def teardown