[前][次][番号順一覧][スレッド一覧]

ruby-changes:64069

From: Hiroshi <ko1@a...>
Date: Thu, 10 Dec 2020 18:55:20 +0900 (JST)
Subject: [ruby-changes:64069] 658b4ff609 (master): Fixed the test failures called WEBrick.new directly

https://git.ruby-lang.org/ruby.git/commit/?id=658b4ff609

From 658b4ff60934b9fb6845e214fda83229e631e366 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Thu, 10 Dec 2020 18:55:03 +0900
Subject: Fixed the test failures called WEBrick.new directly


diff --git a/lib/rubygems/server.rb b/lib/rubygems/server.rb
index 61ea78b..6d472ad 100644
--- a/lib/rubygems/server.rb
+++ b/lib/rubygems/server.rb
@@ -423,6 +423,11 @@ div.method-source-code pre { color: #ffdead; overflow: hidden; } https://github.com/ruby/ruby/blob/trunk/lib/rubygems/server.rb#L423
   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; } https://github.com/ruby/ruby/blob/trunk/lib/rubygems/server.rb#L435
       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
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]