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

ruby-changes:6855

From: shugo <ko1@a...>
Date: Tue, 5 Aug 2008 16:44:00 +0900 (JST)
Subject: [ruby-changes:6855] Ruby:r18371 (ruby_1_8): * lib/net/ftp.rb (chdir): handle 5xx errors correctly.

shugo	2008-08-05 16:43:39 +0900 (Tue, 05 Aug 2008)

  New Revision: 18371

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

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

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/lib/net/ftp.rb

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 18370)
+++ ruby_1_8/ChangeLog	(revision 18371)
@@ -1,3 +1,8 @@
+Tue Aug  5 16:43:07 2008  Shugo Maeda  <shugo@r...>
+
+	* lib/net/ftp.rb (chdir): handle 5xx errors correctly.
+	  backported from trunk.  fixed [ruby-core:18057].
+
 Tue Aug  5 16:33:20 2008  Shugo Maeda  <shugo@r...>
 
 	* lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for
Index: ruby_1_8/lib/net/ftp.rb
===================================================================
--- ruby_1_8/lib/net/ftp.rb	(revision 18370)
+++ ruby_1_8/lib/net/ftp.rb	(revision 18371)
@@ -668,9 +668,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/

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