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

ruby-changes:74263

From: Stan <ko1@a...>
Date: Wed, 26 Oct 2022 23:44:51 +0900 (JST)
Subject: [ruby-changes:74263] 2022470a95 (master): [ruby/irb] Suppress warnings

https://git.ruby-lang.org/ruby.git/commit/?id=2022470a95

From 2022470a954ad673b0c08aecaa9a7881188cd105 Mon Sep 17 00:00:00 2001
From: Stan Lo <stan001212@g...>
Date: Tue, 25 Oct 2022 20:25:49 +0100
Subject: [ruby/irb] Suppress warnings

Co-authored-by: Peter Zhu <peter@p...>
---
 test/irb/test_cmd.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb
index e5e3a3fabf..6c03a9de07 100644
--- a/test/irb/test_cmd.rb
+++ b/test/irb/test_cmd.rb
@@ -429,7 +429,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L429
       assert(possible_rdoc_output.any? { |output| output.match?(out) }, "Expect the help command to match one of the possible outputs")
     ensure
       # this is the only way to reset the redefined method without coupling the test with its implementation
-      load "irb/cmd/help.rb"
+      EnvUtil.suppress_warning { load "irb/cmd/help.rb" }
     end
 
     def test_help_without_rdoc
@@ -454,7 +454,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_cmd.rb#L454
       assert_match(/=> IRB::ExtendCommand::Help\n/, out)
     ensure
       # this is the only way to reset the redefined method without coupling the test with its implementation
-      load "irb/cmd/help.rb"
+      EnvUtil.suppress_warning { load "irb/cmd/help.rb" }
     end
 
     def test_irb_load
-- 
cgit v1.2.3


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

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