From 0116699507500c0886689d5742312b45016de06a Mon Sep 17 00:00:00 2001 From: shugo Date: Tue, 5 Aug 2008 07:42:45 +0000 Subject: * 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 --- lib/net/ftp.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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 -- cgit