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

test/ruby/test_io.rb: remove unnecessary begin/end

Unnecessary since r47422 when the "rescue IOError" clause
was removed.

* test/ruby/test_io.rb (test_readpartial_locktmp):
  remove unnecessary begin/end

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2014-11-16 02:09:22 +00:00
parent f4330f7f6b
commit e96274f604
2 changed files with 22 additions and 19 deletions

View file

@ -1,3 +1,8 @@
Sun Nov 16 11:07:25 2014 Eric Wong <e@80x24.org>
* test/ruby/test_io.rb (test_readpartial_locktmp):
remove unnecessary begin/end
Sun Nov 16 00:45:23 2014 Tanaka Akira <akr@fsij.org>
* common.mk: Specify dependencies for generated C sources.

View file

@ -2927,27 +2927,25 @@ End
data = "a" * 100
th = nil
with_pipe do |r,w|
r.nonblock = true
th = Thread.new {r.readpartial(100, buf)}
Thread.pass until th.stop?
assert_equal 100, buf.bytesize
begin
r.nonblock = true
th = Thread.new {r.readpartial(100, buf)}
buf.replace("")
rescue RuntimeError => e
assert_match(/can't modify string; temporarily locked/, e.message)
Thread.pass
end until buf.empty?
Thread.pass until th.stop?
assert_equal 100, buf.bytesize
begin
buf.replace("")
rescue RuntimeError => e
assert_match(/can't modify string; temporarily locked/, e.message)
Thread.pass
end until buf.empty?
assert_empty(buf, bug6099)
assert_predicate(th, :alive?)
w.write(data)
Thread.pass while th.alive?
th.join
end
assert_empty(buf, bug6099)
assert_predicate(th, :alive?)
w.write(data)
Thread.pass while th.alive?
th.join
end
assert_equal(data, buf, bug6099)
end