summaryrefslogtreecommitdiff
path: root/lib/webrick/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webrick/utils.rb')
-rw-r--r--lib/webrick/utils.rb7
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