summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-05 07:42:45 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-05 07:42:45 +0000
commit0116699507500c0886689d5742312b45016de06a (patch)
treed8fc6570e7e31ff494706fd75ed832089f5d1510
parent04ed051d4128f17af30186249e368acbf9a766a8 (diff)
downloadruby-0116699507500c0886689d5742312b45016de06a.tar.gz
ruby-0116699507500c0886689d5742312b45016de06a.tar.xz
ruby-0116699507500c0886689d5742312b45016de06a.zip
* lib/net/ftp.rb (chdir): handle 5xx errors correctly.
fixed [ruby-core:18057]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/ftp.rb6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5476dfac3..fb4345d04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Aug 5 16:40:06 2008 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/ftp.rb (chdir): handle 5xx errors correctly.
+ fixed [ruby-core:18057].
+
Tue Aug 5 16:38:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/win32.h, bcc32/Makefile.sub (config.h): bcc 5.8 has
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index 855684de8..436ccd937 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -722,9 +722,9 @@ module Net
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