summaryrefslogtreecommitdiff
path: root/test/ruby/test_autoload.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2022-06-20 17:39:58 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-06-20 17:39:58 +0900
commit078db98da42444b3cdbd0f391b680ba8193299fd (patch)
treeb1e37a3acbf7bc2a601a1715ae0d0910faa20492 /test/ruby/test_autoload.rb
parent8d689294d033d59f211a6d2c2da72b34ce53c4e5 (diff)
Prevent a warning "Expected ... to define AutoloadTest but it didn't"
related: [Bugs #18813] and eca31d24d606a73def3674938112dc3c5b79c445
Diffstat (limited to 'test/ruby/test_autoload.rb')
-rw-r--r--test/ruby/test_autoload.rb3
1 files changed, 3 insertions, 0 deletions
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