Index: lib/net/ftp.rb =================================================================== --- lib/net/ftp.rb (Revision 18315) +++ lib/net/ftp.rb (Arbeitskopie) @@ -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