summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-16 02:09:22 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-16 02:09:22 +0000
commite96274f604f564b8480757acbee5202b39ea5a22 (patch)
tree746287a109dc41e699df7b4a5bf0c3c26f87b16c
parentf4330f7f6b5ab169837a979ff7fccea0c2a9bc8c (diff)
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
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_io.rb34
2 files changed, 21 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index a961a90ac9..6e958af506 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
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