summaryrefslogtreecommitdiff
path: root/test/webrick/test_filehandler.rb
diff options
context:
space:
mode:
authorthekuwayama <thekuwayama@gmail.com>2019-07-05 23:25:47 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-10-24 19:46:01 +0900
commitf0452574b16462d0edea16e9b22e55e21e146a49 (patch)
tree0cfbe494c2cb5494512fe1c02502579de39b894c /test/webrick/test_filehandler.rb
parentb809784817649817c3e53fa000f57504446caef9 (diff)
[ruby/webrick] after ruby-2.6.0, set Net::HTTP#write_timeout
https://github.com/ruby/webrick/commit/3b51f6b4d2
Diffstat (limited to 'test/webrick/test_filehandler.rb')
-rw-r--r--test/webrick/test_filehandler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index b5fb4e4a70..4526b1e30a 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -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)
+ http.write_timeout = EnvUtil.apply_timeout_scale(60) if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
req = Net::HTTP::Get.new("/webrick.cgi/test")
http.request(req) do |res|