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

ruby-changes:6854

From: shugo <ko1@a...>
Date: Tue, 5 Aug 2008 16:43:37 +0900 (JST)
Subject: [ruby-changes:6854] Ruby:r18370 (trunk): * lib/net/ftp.rb (chdir): handle 5xx errors correctly.

shugo	2008-08-05 16:42:45 +0900 (Tue, 05 Aug 2008)

  New Revision: 18370

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

  Log:
    * lib/net/ftp.rb (chdir): handle 5xx errors correctly.
      fixed [ruby-core:18057].

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/ftp.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18369)
+++ ChangeLog	(revision 18370)
@@ -1,3 +1,8 @@
+Tue Aug  5 16:40:06 2008  Shugo Maeda  <shugo@r...>
+
+	* lib/net/ftp.rb (chdir): handle 5xx errors correctly.
+	  fixed [ruby-core:18057].
+
 Tue Aug  5 16:38:59 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* include/ruby/win32.h, bcc32/Makefile.sub (config.h): bcc 5.8 has
Index: lib/net/ftp.rb
===================================================================
--- lib/net/ftp.rb	(revision 18369)
+++ lib/net/ftp.rb	(revision 18370)
@@ -722,9 +722,9 @@
 	begin
 	  voidcmd("CDUP")
 	  return
-	rescue FTPPermError
-	  if $![0, 3] != "500"
-	    raise FTPPermError, $!
+	rescue FTPPermError => e
+	  if e.message[0, 3] != "500"
+	    raise e
 	  end
 	end
       end

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

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