summaryrefslogtreecommitdiff
path: root/lib/webrick/server.rb
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-23 10:09:07 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-23 10:09:07 +0000
commit3b6992be6712b7ec1a58f030b08ab53940db33ae (patch)
tree7cd71f8f00a9fc3ce650e2f8720f26aa848d6fb3 /lib/webrick/server.rb
parent28199eeae85647c68fd03682c464221be3b88dbe (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/server.rb')
-rw-r--r--lib/webrick/server.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb
index 87a33ff..4657573 100644
--- a/lib/webrick/server.rb
+++ b/lib/webrick/server.rb
@@ -61,6 +61,9 @@ module WEBrick
warn(":Listen option is deprecated; use GenericServer#listen")
end
listen(@config[:BindAddress], @config[:Port])
+ if @config[:Port] == 0
+ @config[:Port] = @listeners[0].addr[1]
+ end
end
end