diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-05 07:42:45 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-05 07:42:45 +0000 |
commit | 1498b668d2f8dc4eef3254dbdb2eb015a271fcf2 (patch) | |
tree | d8fc6570e7e31ff494706fd75ed832089f5d1510 /lib | |
parent | 5133fc67a43b5a6d6b4dd934752ec8b8d6d85b33 (diff) | |
download | ruby-1498b668d2f8dc4eef3254dbdb2eb015a271fcf2.tar.gz |
* lib/net/ftp.rb (chdir): handle 5xx errors correctly.
fixed [ruby-core:18057].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/ftp.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 855684de89..436ccd937f 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 |