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

ruby-changes:36302

From: akr <ko1@a...>
Date: Wed, 12 Nov 2014 00:28:35 +0900 (JST)
Subject: [ruby-changes:36302] akr:r48383 (trunk): * test/ruby/test_object.rb: Specify an exception class for rescue clause.

akr	2014-11-12 00:28:17 +0900 (Wed, 12 Nov 2014)

  New Revision: 48383

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

  Log:
    * test/ruby/test_object.rb: Specify an exception class for rescue clause.
    
    * test/dbm/test_dbm.rb: Ditto.
    
    * test/gdbm/test_gdbm.rb: Ditto.
    
    * test/sdbm/test_sdbm.rb: Ditto.

  Modified files:
    trunk/ChangeLog
    trunk/test/dbm/test_dbm.rb
    trunk/test/gdbm/test_gdbm.rb
    trunk/test/ruby/test_object.rb
    trunk/test/sdbm/test_sdbm.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48382)
+++ ChangeLog	(revision 48383)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Nov 12 00:26:37 2014  Tanaka Akira  <akr@f...>
+
+	* test/ruby/test_object.rb: Specify an exception class for rescue clause.
+
+	* test/dbm/test_dbm.rb: Ditto.
+
+	* test/gdbm/test_gdbm.rb: Ditto.
+
+	* test/sdbm/test_sdbm.rb: Ditto.
+
 Tue Nov 11 23:43:51 2014  Tanaka Akira  <akr@f...>
 
 	* test/fileutils/test_fileutils.rb: Use assert_join_threads.
Index: test/ruby/test_object.rb
===================================================================
--- test/ruby/test_object.rb	(revision 48382)
+++ test/ruby/test_object.rb	(revision 48383)
@@ -591,7 +591,7 @@ class TestObject < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_object.rb#L591
     end
     begin
       nil.public_send(o) { x = :ng }
-    rescue
+    rescue TypeError
     end
     assert_equal(:ok, x)
   end
Index: test/sdbm/test_sdbm.rb
===================================================================
--- test/sdbm/test_sdbm.rb	(revision 48382)
+++ test/sdbm/test_sdbm.rb	(revision 48383)
@@ -399,7 +399,7 @@ class TestSDBM < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/sdbm/test_sdbm.rb#L399
 	n+=1
 	true
       }
-    rescue
+    rescue RuntimeError
     end
     assert_equal(51, n)
     check_size(49, @sdbm)
Index: test/dbm/test_dbm.rb
===================================================================
--- test/dbm/test_dbm.rb	(revision 48382)
+++ test/dbm/test_dbm.rb	(revision 48383)
@@ -447,7 +447,7 @@ if defined? DBM https://github.com/ruby/ruby/blob/trunk/test/dbm/test_dbm.rb#L447
           n+=1
           true
         }
-      rescue
+      rescue RuntimeError
       end
       assert_equal(51, n)
       check_size(49, @dbm)
Index: test/gdbm/test_gdbm.rb
===================================================================
--- test/gdbm/test_gdbm.rb	(revision 48382)
+++ test/gdbm/test_gdbm.rb	(revision 48383)
@@ -498,7 +498,7 @@ if defined? GDBM https://github.com/ruby/ruby/blob/trunk/test/gdbm/test_gdbm.rb#L498
           n+=1
           true
         }
-      rescue
+      rescue RuntimeError
       end
       assert_equal(51, n)
       check_size(49, @gdbm)

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

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