ruby-changes:62770
From: Nobuyoshi <ko1@a...>
Date: Mon, 31 Aug 2020 17:46:16 +0900 (JST)
Subject: [ruby-changes:62770] 0eec4ae851 (master): Get rid of using Socket.gethostbyname
https://git.ruby-lang.org/ruby.git/commit/?id=0eec4ae851 From 0eec4ae85179fb6c8abd17d27b946d86f177f027 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 31 Aug 2020 17:23:54 +0900 Subject: Get rid of using Socket.gethostbyname diff --git a/lib/webrick/utils.rb b/lib/webrick/utils.rb index 0704487..a96d6f0 100644 --- a/lib/webrick/utils.rb +++ b/lib/webrick/utils.rb @@ -45,12 +45,7 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/utils.rb#L45 ## # The server hostname def getservername - host = Socket::gethostname - begin - Socket::gethostbyname(host)[0] - rescue - host - end + Socket::gethostname end module_function :getservername -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/