summaryrefslogtreecommitdiff
path: root/lib/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/ftp.rb6
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