diff options
| author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-12 14:25:53 +0000 |
|---|---|---|
| committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-12 14:25:53 +0000 |
| commit | 38f8c64efe0dc99c036d59b94127d219ad1b2a69 (patch) | |
| tree | b605e08bafa3b2ae3b2dbb12f1dd2907b88f332c | |
| parent | 5d1364df501aaa8fd144562c4efe62611a260bc6 (diff) | |
* 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
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | lib/net/ftp.rb | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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 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"] |
