1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/net/ftp.rb (getaddress): rescue exceptions. [ruby-dev:39451]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2009-10-12 14:25:53 +00:00
parent 5d1364df50
commit 38f8c64efe
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Mon Oct 12 23:24:58 2009 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/ftp.rb (getaddress): rescue exceptions. [ruby-dev:39451]
Sun Oct 11 15:54:52 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/gdbm/gdbm.c (fgdbm_select): fixed rdoc. a patch from Justin

View file

@ -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"]