From 0eec4ae85179fb6c8abd17d27b946d86f177f027 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 31 Aug 2020 17:23:54 +0900 Subject: Get rid of using Socket.gethostbyname --- lib/webrick/utils.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/webrick') 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 -- cgit v1.2.3