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

ruby-changes:73653

From: Hiroshi <ko1@a...>
Date: Wed, 21 Sep 2022 14:25:55 +0900 (JST)
Subject: [ruby-changes:73653] c287deecb6 (master): backup IRBRC environmental variable. It's used by test methods when it's defined.

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

From c287deecb6431110df9613181bc12b7ae6d77c2c Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Wed, 21 Sep 2022 10:53:06 +0900
Subject: backup IRBRC environmental variable. It's used by test methods when
 it's defined.

---
 test/irb/test_history.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb
index 8da86ca7a8..fab3807447 100644
--- a/test/irb/test_history.rb
+++ b/test/irb/test_history.rb
@@ -161,6 +161,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_history.rb#L161
     def test_history_concurrent_use_not_present
       backup_home = ENV["HOME"]
       backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
+      backup_irbrc = ENV.delete("IRBRC")
       IRB.conf[:LC_MESSAGES] = IRB::Locale.new
       IRB.conf[:SAVE_HISTORY] = 1
       Dir.mktmpdir("test_irb_history_") do |tmpdir|
@@ -179,6 +180,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_history.rb#L180
     ensure
       ENV["HOME"] = backup_home
       ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home
+      ENV["IRBRC"] = backup_irbrc
     end
 
     private
-- 
cgit v1.2.1


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

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