From 3c299b5fe5d653e2ec231f6afb97445f8860c898 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sun, 11 Jan 2009 02:33:36 +0000 Subject: merge revision(s) 18371: * lib/net/ftp.rb (chdir): handle 5xx errors correctly. backported from trunk. fixed [ruby-core:18057]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21429 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 ca2c00a790..2b195c2bab 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -668,9 +668,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 v1.2.3