1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/webrick] Check the feature by itself, instead of the version number

https://github.com/ruby/webrick/commit/79d7922de9
This commit is contained in:
Nobuyoshi Nakada 2019-08-28 21:58:25 +09:00 committed by Hiroshi SHIBATA
parent a98632d5c2
commit 5e9f08647c

View file

@ -308,7 +308,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
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|