[前][次][番号順一覧][スレッド一覧]

ruby-changes:36374

From: normal <ko1@a...>
Date: Sun, 16 Nov 2014 11:09:28 +0900 (JST)
Subject: [ruby-changes:36374] normal:r48455 (trunk): test/ruby/test_io.rb: remove unnecessary begin/end

normal	2014-11-16 11:09:22 +0900 (Sun, 16 Nov 2014)

  New Revision: 48455

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48455

  Log:
    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

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_io.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48454)
+++ ChangeLog	(revision 48455)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Nov 16 11:07:25 2014  Eric Wong  <e@8...>
+
+	* test/ruby/test_io.rb (test_readpartial_locktmp):
+	  remove unnecessary begin/end
+
 Sun Nov 16 00:45:23 2014  Tanaka Akira  <akr@f...>
 
 	* common.mk: Specify dependencies for generated C sources.
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 48454)
+++ test/ruby/test_io.rb	(revision 48455)
@@ -2927,27 +2927,25 @@ End https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L2927
     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?
+      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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]