From 305f66b859c0fd123c95db74700d8b2c13fe2fe2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 12 Dec 2023 11:06:27 +0900 Subject: [PATCH] Save $VERBOSE properly --- test/irb/test_history.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb index 755346d448450f..f7ba2b9d33ca2f 100644 --- a/test/irb/test_history.rb +++ b/test/irb/test_history.rb @@ -149,10 +149,9 @@ def test_history_concurrent_use_not_present end def test_history_different_encodings - verbose_bak = nil backup_default_external = Encoding.default_external IRB.conf[:SAVE_HISTORY] = 2 - $VERBOSE = nil + verbose_bak, $VERBOSE = $VERBOSE, nil Encoding.default_external = Encoding::US_ASCII locale = IRB::Locale.new("C") assert_history(<<~EXPECTED_HISTORY.encode(Encoding::US_ASCII), <<~INITIAL_HISTORY.encode(Encoding::UTF_8), <<~INPUT, locale: locale)