[前][次][番号順一覧][スレッド一覧]

ruby-changes:61044

From: Yusuke <ko1@a...>
Date: Fri, 8 May 2020 00:16:47 +0900 (JST)
Subject: [ruby-changes:61044] 3b147c4213 (master): test/irb/test_cmd.rb: clear IRB.@CONF on setup

https://git.ruby-lang.org/ruby.git/commit/?id=3b147c4213

From 3b147c421368825ab3ff69dd78d10d7f7db0765e Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Fri, 8 May 2020 00:15:01 +0900
Subject: 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".
```

diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb
index e50d036..dd24c1e 100644
--- a/test/irb/test_cmd.rb
+++ b/test/irb/test_cmd.rb
@@ -18,6 +18,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L18
       @home_backup = ENV["HOME"]
       ENV["HOME"] = @tmpdir
       @default_encoding = [Encoding.default_external, Encoding.default_internal]
+      IRB.instance_variable_get(:@CONF).clear
     end
 
     def teardown
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]