diff --git a/ChangeLog b/ChangeLog index 6cb2ac45db..bec578c042 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Oct 12 23:24:58 2009 Shugo Maeda + + * lib/net/ftp.rb (getaddress): rescue exceptions. [ruby-dev:39451] + Sun Oct 11 15:54:52 2009 Nobuyoshi Nakada * ext/gdbm/gdbm.c (fgdbm_select): fixed rdoc. a patch from Justin diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index e07418e83e..369aba893c 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -346,9 +346,9 @@ module Net private :transfercmd def getaddress - thishost = Socket.gethostname + thishost = Socket.gethostname rescue "" if not thishost.index(".") - thishost = Socket.gethostbyname(thishost)[0] + thishost = Socket.gethostbyname(thishost)[0] rescue "" end if ENV.has_key?("LOGNAME") realuser = ENV["LOGNAME"]