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

ruby-changes:40067

From: nobu <ko1@a...>
Date: Sat, 17 Oct 2015 14:01:47 +0900 (JST)
Subject: [ruby-changes:40067] nobu:r52148 (trunk): test_const.rb: suppress warnings

nobu	2015-10-17 14:01:41 +0900 (Sat, 17 Oct 2015)

  New Revision: 52148

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52148

  Log:
    test_const.rb: suppress warnings
    
    * test/ruby/test_const.rb (test_redefinition_memory_leak):
      suppress warnings instead of redirecting to null device.

  Modified files:
    trunk/test/ruby/test_const.rb
Index: test/ruby/test_const.rb
===================================================================
--- test/ruby/test_const.rb	(revision 52147)
+++ test/ruby/test_const.rb	(revision 52148)
@@ -62,11 +62,8 @@ WARNING https://github.com/ruby/ruby/blob/trunk/test/ruby/test_const.rb#L62
 
   def test_redefinition_memory_leak
     code = <<-PRE
-olderr = $stderr.dup
-$stderr.reopen(File::NULL, "wb")
 350000.times { FOO = :BAR }
-$stderr.reopen(olderr)
 PRE
-    assert_no_memory_leak([], '', code, 'redefined constant', timeout: 30)
+    assert_no_memory_leak(%w[-W0 -], '', code, 'redefined constant', timeout: 30)
   end
 end

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

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