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:
parent
a21d0f72c2
commit
3c45e3f1b7
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue