ruby-changes:64839
From: Hiroshi <ko1@a...>
Date: Tue, 12 Jan 2021 20:16:14 +0900 (JST)
Subject: [ruby-changes:64839] 0dc95266e8 (master): Fix the failing test with XDG_CONFIG_HOME
https://git.ruby-lang.org/ruby.git/commit/?id=0dc95266e8 From 0dc95266e8c36dbc3bfdcb88d820cb7f897166d7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Tue, 12 Jan 2021 20:15:18 +0900 Subject: Fix the failing test with XDG_CONFIG_HOME diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb index b51d010..83b4b5a 100644 --- a/test/irb/test_init.rb +++ b/test/irb/test_init.rb @@ -21,6 +21,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_init.rb#L21 def test_rc_file backup_irbrc = ENV.delete("IRBRC") # This is for RVM... + backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME") backup_home = ENV["HOME"] Dir.mktmpdir("test_irb_init_#{$$}") do |tmpdir| ENV["HOME"] = tmpdir @@ -35,11 +36,13 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_init.rb#L36 end ensure ENV["HOME"] = backup_home + ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home ENV["IRBRC"] = backup_irbrc end def test_rc_file_in_subdir backup_irbrc = ENV.delete("IRBRC") # This is for RVM... + backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME") backup_home = ENV["HOME"] Dir.mktmpdir("test_irb_init_#{$$}") do |tmpdir| ENV["HOME"] = tmpdir @@ -57,6 +60,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_init.rb#L60 end ensure ENV["HOME"] = backup_home + ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home ENV["IRBRC"] = backup_irbrc end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/