diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-18 13:58:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-18 13:58:26 +0000 |
commit | 0b9d86f29be8e3d4fa0958bf3db41907e21ad1a0 (patch) | |
tree | dfa24a87d829ebc08f0c6684db4a96dc66793bbe /lib/un.rb | |
parent | 82c290983ff45227d002f81bb9fa1e0e64ba9f34 (diff) | |
download | bundler-0b9d86f29be8e3d4fa0958bf3db41907e21ad1a0.tar.gz |
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
Diffstat (limited to 'lib/un.rb')
-rw-r--r-- | lib/un.rb | 5 |
1 files changed, 1 insertions, 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" |