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

ruby-changes:21186

From: naruse <ko1@a...>
Date: Fri, 9 Sep 2011 15:31:16 +0900 (JST)
Subject: [ruby-changes:21186] naruse:r33235 (trunk): Run GC.start before test_too_long_path.

naruse	2011-09-09 15:29:36 +0900 (Fri, 09 Sep 2011)

  New Revision: 33235

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

  Log:
    Run GC.start before test_too_long_path.
    
    NoMemoryError is raised in MiniTest#exception_details where exception
    is made, and no effect. Run GC.start before running to keep the room.

  Modified files:
    trunk/test/ruby/test_process.rb

Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 33234)
+++ test/ruby/test_process.rb	(revision 33235)
@@ -1236,15 +1236,17 @@
   end if File.executable?("/bin/sh")
 
   def test_too_long_path
+    GC.start
     bug4314 = '[ruby-core:34842]'
-    exs = [NoMemoryError, Errno::ENOENT]
+    exs = [Errno::ENOENT]
     exs << Errno::E2BIG if defined?(Errno::E2BIG)
     assert_raise(*exs, bug4314) {Process.spawn("a" * 10_000_000)}
   end
 
   def test_too_long_path2
+    GC.start
     bug4315 = '[ruby-core:34833]'
-    exs = [NoMemoryError, Errno::ENOENT]
+    exs = [Errno::ENOENT]
     exs << Errno::E2BIG if defined?(Errno::E2BIG)
     assert_raise(*exs, bug4315) {Process.spawn('"a"|'*10_000_000)}
   end

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

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