1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-03-09 05:52:18 +00:00
parent a21d0f72c2
commit 3c45e3f1b7

View file

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