mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
un.rb: cwd by default
* lib/un.rb (httpd): set DocumentRoot to the current working directory by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
82c290983f
commit
0b9d86f29b
1 changed files with 1 additions and 4 deletions
|
|
@ -320,10 +320,7 @@ def httpd
|
|||
opt = options[name] and (options[name] = Integer(opt)) rescue nil
|
||||
end
|
||||
options[:Port] ||= 8080 # HTTP Alternate
|
||||
unless argv.size == 1
|
||||
raise ArgumentError, "DocumentRoot is mandatory"
|
||||
end
|
||||
options[:DocumentRoot] = argv.shift
|
||||
options[:DocumentRoot] = argv.shift || '.'
|
||||
s = WEBrick::HTTPServer.new(options)
|
||||
shut = proc {s.shutdown}
|
||||
siglist = %w"TERM QUIT"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue