Fixed the test failures called WEBrick.new directly

This commit is contained in:
Hiroshi SHIBATA 2020-12-10 18:55:03 +09:00
parent 72f1c43584
commit 658b4ff609
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -423,6 +423,11 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
ERB
def self.run(options)
new(options[:gemdir], options[:port], options[:daemon],
options[:launch], options[:addresses]).run
end
def initialize(gem_dirs, port, daemon, launch = nil, addresses = nil)
begin
require 'webrick'
rescue LoadError
@ -430,11 +435,6 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; }
exit
end
new(options[:gemdir], options[:port], options[:daemon],
options[:launch], options[:addresses]).run
end
def initialize(gem_dirs, port, daemon, launch = nil, addresses = nil)
Gem::RDoc.load_rdoc
Socket.do_not_reverse_lookup = true