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

ruby-changes:22908

From: naruse <ko1@a...>
Date: Fri, 9 Mar 2012 14:52:28 +0900 (JST)
Subject: [ruby-changes:22908] naruse:r34957 (trunk): Rescue even if it test_readpartial_locktmp RuntimeError. [Bug#6099]

naruse	2012-03-09 14:52:18 +0900 (Fri, 09 Mar 2012)

  New Revision: 34957

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

  Log:
    Rescue even if it test_readpartial_locktmp RuntimeError. [Bug#6099]

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

Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 34956)
+++ test/ruby/test_io.rb	(revision 34957)
@@ -2249,12 +2249,12 @@
       th = Thread.new {r.sysread(100, buf)}
       Thread.pass until th.stop?
       buf.replace("")
-      assert_empty(buf)
+      assert_empty(buf, bug6099)
       w.write(data)
       Thread.pass while th.alive?
       th.join
     end
-    assert_equal(data, buf)
+    assert_equal(data, buf, bug6099)
   end
 
   def test_readpartial_locktmp
@@ -2267,11 +2267,12 @@
       th = Thread.new {r.readpartial(100, buf)}
       Thread.pass until th.stop?
       buf.replace("")
-      assert_empty(buf)
+      assert_empty(buf, bug6099)
       w.write(data)
       Thread.pass while th.alive?
       th.join
     end
-    assert_equal(data, buf)
+    assert_equal(data, buf, bug6099)
+  rescue RuntimeError # can't modify string; temporarily locked
   end
 end

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

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