aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-05-08 00:15:01 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-05-08 00:15:01 +0900
commit3b147c421368825ab3ff69dd78d10d7f7db0765e (patch)
treeb3b1c9c809304e338d0a145f599414d1f5d8f592
parent00a3b8f73054836f2f9be6c25210ba49a5b9b105 (diff)
downloadruby-3b147c421368825ab3ff69dd78d10d7f7db0765e.tar.gz
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". ```
-rw-r--r--test/irb/test_cmd.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb
index e50d036f19..dd24c1e4fc 100644
--- a/test/irb/test_cmd.rb
+++ b/test/irb/test_cmd.rb
@@ -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