diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-16 02:09:22 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-16 02:09:22 +0000 |
commit | e96274f604f564b8480757acbee5202b39ea5a22 (patch) | |
tree | 746287a109dc41e699df7b4a5bf0c3c26f87b16c /test/ruby | |
parent | f4330f7f6b5ab169837a979ff7fccea0c2a9bc8c (diff) | |
download | ruby-e96274f604f564b8480757acbee5202b39ea5a22.tar.gz |
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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 2d8072a830..39f357a6b9 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2927,27 +2927,25 @@ End data = "a" * 100 th = nil with_pipe do |r,w| - begin - r.nonblock = true - th = Thread.new {r.readpartial(100, buf)} + r.nonblock = true + th = Thread.new {r.readpartial(100, buf)} - Thread.pass until th.stop? + Thread.pass until th.stop? - assert_equal 100, buf.bytesize + 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 + 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_equal(data, buf, bug6099) end |