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

ruby-changes:39640

From: nobu <ko1@a...>
Date: Sat, 29 Aug 2015 14:20:11 +0900 (JST)
Subject: [ruby-changes:39640] nobu:r51721 (trunk): test_pathname.rb: fix exception

nobu	2015-08-29 14:19:49 +0900 (Sat, 29 Aug 2015)

  New Revision: 51721

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

  Log:
    test_pathname.rb: fix exception
    
    * test/pathname/test_pathname.rb (has_symlink): now raises ENOENT
      instead of TypeError when symlink is available.

  Modified files:
    trunk/test/pathname/test_pathname.rb
Index: test/pathname/test_pathname.rb
===================================================================
--- test/pathname/test_pathname.rb	(revision 51720)
+++ test/pathname/test_pathname.rb	(revision 51721)
@@ -342,7 +342,7 @@ class TestPathname < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L342
       File.symlink("", "")
     rescue NotImplementedError, Errno::EACCES
       return false
-    rescue TypeError
+    rescue Errno::ENOENT
     end
     return true
   end

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

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