ruby-changes:13535
From: shugo <ko1@a...>
Date: Mon, 12 Oct 2009 23:26:04 +0900 (JST)
Subject: [ruby-changes:13535] Ruby:r25311 (ruby_1_8): * lib/net/ftp.rb (getaddress): rescue exceptions.
shugo 2009-10-12 23:25:53 +0900 (Mon, 12 Oct 2009) New Revision: 25311 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25311 Log: * lib/net/ftp.rb (getaddress): rescue exceptions. [ruby-dev:39451] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/net/ftp.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 25310) +++ ruby_1_8/ChangeLog (revision 25311) @@ -1,3 +1,7 @@ +Mon Oct 12 23:24:58 2009 Shugo Maeda <shugo@r...> + + * lib/net/ftp.rb (getaddress): rescue exceptions. [ruby-dev:39451] + Sun Oct 11 15:54:52 2009 Nobuyoshi Nakada <nobu@r...> * ext/gdbm/gdbm.c (fgdbm_select): fixed rdoc. a patch from Justin Index: ruby_1_8/lib/net/ftp.rb =================================================================== --- ruby_1_8/lib/net/ftp.rb (revision 25310) +++ ruby_1_8/lib/net/ftp.rb (revision 25311) @@ -346,9 +346,9 @@ 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"] -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/