summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2023-12-12 10:28:19 +0900
committerYusuke Endoh <mame@ruby-lang.org>2023-12-12 10:31:37 +0900
commit0c287df3bc4c1a7aed3279e20590ecf628722b4d (patch)
treecd68e6254f3ad6ea6841a7293e4a2aa09127fcb1 /test
parent535eb4de1109f5b8a8bde063dacc4c6fabf2322c (diff)
Prevent a warning: setting Encoding.default_external
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_history.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb
index b211e87bed..755346d448 100644
--- a/test/irb/test_history.rb
+++ b/test/irb/test_history.rb
@@ -149,8 +149,10 @@ module TestIRB
end
def test_history_different_encodings
+ verbose_bak = nil
backup_default_external = Encoding.default_external
IRB.conf[:SAVE_HISTORY] = 2
+ $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)
@@ -163,6 +165,7 @@ module TestIRB
INPUT
ensure
Encoding.default_external = backup_default_external
+ $VERBOSE = verbose_bak
end
private