summaryrefslogtreecommitdiff
path: root/lib/un.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-24 21:15:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-24 21:15:33 +0000
commit4fcc6f1ef1428f6357150695843ca314c6e1d5a1 ()
tree25367b6e333ec71102c918b3b1a15f23a0b9e9c8 /lib/un.rb
parenta4d39115034313b70addd078e6997d94c8685064 (diff)
* lib/un.rb (setup): fix of word splitting. [ruby-dev:41723]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/un.rb7
1 files changed, 5 insertions, 2 deletions
@@ -45,7 +45,8 @@ def setup(options = "", *long_options)
long_options.each do |s|
opt_name, arg_name = s.split(/(?=[\s=])/, 2)
opt_name.sub!(/\A--/, '')
- s = "--#{opt_name.gsub(/([A-Za-z]+)([A-Z])/, '\1-\2').downcase}#{arg_name}"
opt_name = opt_name.intern
o.on(s) do |val|
opt_hash[opt_name] = val
@@ -307,7 +308,9 @@ 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