1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/un.rb (httpd): try to convert port number to integer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-12-16 07:58:01 +00:00
parent db9e8351f3
commit 6547a2bcbb
2 changed files with 5 additions and 0 deletions

View file

@ -304,6 +304,7 @@ def httpd
|argv, options|
require 'webrick'
opt = options[:RequestTimeout] and options[:RequestTimeout] = opt.to_i
opt = options[:Port] and (options[:Port] = Integer(opt)) rescue nil
unless argv.empty?
options[:DocumentRoot] = argv.shift
end