mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
backup IRBRC environmental variable. It's used by test methods when it's defined.
This commit is contained in:
parent
d6e84d97fe
commit
c287deecb6
Notes:
git
2022-09-21 14:26:03 +09:00
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue