diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-09-21 10:53:06 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-09-21 14:25:42 +0900 |
commit | c287deecb6431110df9613181bc12b7ae6d77c2c (patch) | |
tree | 4e6829587ad09e097b4372816dee9f07f514c6d8 /test | |
parent | d6e84d97fee0eed62d0df20a144b11ec3c8240d4 (diff) |
backup IRBRC environmental variable. It's used by test methods when it's defined.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6411
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_history.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 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 ensure ENV["HOME"] = backup_home ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home + ENV["IRBRC"] = backup_irbrc end private |