[前][次][番号順一覧][スレッド一覧]

ruby-changes:72248

From: Yusuke <ko1@a...>
Date: Mon, 20 Jun 2022 17:42:10 +0900 (JST)
Subject: [ruby-changes:72248] 078db98da4 (master): Prevent a warning "Expected ... to define AutoloadTest but it didn't"

https://git.ruby-lang.org/ruby.git/commit/?id=078db98da4

From 078db98da42444b3cdbd0f391b680ba8193299fd Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Mon, 20 Jun 2022 17:39:58 +0900
Subject: 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_autoload.rb#L150
   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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_autoload.rb#L163
         remove_autoload_constant
       end
     }
+  ensure
+    $VERBOSE = verbose_bak
   end
 
   def test_override_autoload
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]