diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-08-31 17:23:54 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-08-31 17:45:27 +0900 |
commit | 0eec4ae85179fb6c8abd17d27b946d86f177f027 (patch) | |
tree | 20f864502902b12e7a7f8b87a2f675e69d6dd181 /lib | |
parent | 3e1aea461320094e634ab32ca0b13dd43b69d8b0 (diff) | |
download | ruby-0eec4ae85179fb6c8abd17d27b946d86f177f027.tar.gz |
Get rid of using Socket.gethostbyname
Diffstat (limited to 'lib')
-rw-r--r-- | lib/webrick/utils.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/webrick/utils.rb b/lib/webrick/utils.rb index 07044876b9..a96d6f03fd 100644 --- a/lib/webrick/utils.rb +++ b/lib/webrick/utils.rb @@ -45,12 +45,7 @@ module WEBrick ## # The server hostname def getservername - host = Socket::gethostname - begin - Socket::gethostbyname(host)[0] - rescue - host - end + Socket::gethostname end module_function :getservername |