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

ruby-changes:58995

From: Nobuyoshi <ko1@a...>
Date: Sat, 30 Nov 2019 23:50:03 +0900 (JST)
Subject: [ruby-changes:58995] 5e9f08647c (master): [ruby/webrick] Check the feature by itself, instead of the version number

https://git.ruby-lang.org/ruby.git/commit/?id=5e9f08647c

From 5e9f08647cead8b7fa303a5da88c5e96035f3497 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 28 Aug 2019 21:58:25 +0900
Subject: [ruby/webrick] Check the feature by itself, instead of the version
 number

https://github.com/ruby/webrick/commit/79d7922de9

diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index b3f0de2..33b6d7b 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -308,7 +308,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/webrick/test_filehandler.rb#L308
     TestWEBrick.start_httpserver(config, log_tester) do |server, addr, port, log|
       http = Net::HTTP.new(addr, port)
       http.read_timeout = EnvUtil.apply_timeout_scale(60)
-      http.write_timeout = EnvUtil.apply_timeout_scale(60) if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
+      http.write_timeout = EnvUtil.apply_timeout_scale(60) if http.respond_to?(:write_timeout=)
 
       req = Net::HTTP::Get.new("/webrick.cgi/test")
       http.request(req) do |res|
-- 
cgit v0.10.2


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

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