From 078db98da42444b3cdbd0f391b680ba8193299fd Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 20 Jun 2022 17:39:58 +0900 Subject: [PATCH] Prevent a warning "Expected ... to define AutoloadTest but it didn't" related: [Bugs #18813] and eca31d24d606a73def3674938112dc3c5b79c445 --- test/ruby/test_autoload.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb index 2e1a6ef2b9..1528fdd97a 100644 --- a/test/ruby/test_autoload.rb +++ b/test/ruby/test_autoload.rb @@ -150,6 +150,7 @@ p Foo::Bar end def test_nameerror_when_autoload_did_not_define_the_constant + verbose_bak, $VERBOSE = $VERBOSE, nil Tempfile.create(['autoload', '.rb']) {|file| file.puts '' file.close @@ -162,6 +163,8 @@ p Foo::Bar remove_autoload_constant end } + ensure + $VERBOSE = verbose_bak end def test_override_autoload