Skip to content

Commit 79d7922

Browse files
committed
Check the feature by itself, instead of the version number
1 parent 8b96088 commit 79d7922

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/webrick/test_filehandler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def req.meta_vars
308308
TestWEBrick.start_httpserver(config, log_tester) do |server, addr, port, log|
309309
http = Net::HTTP.new(addr, port)
310310
http.read_timeout = EnvUtil.apply_timeout_scale(60)
311-
http.write_timeout = EnvUtil.apply_timeout_scale(60) if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
311+
http.write_timeout = EnvUtil.apply_timeout_scale(60) if http.respond_to?(:write_timeout=)
312312

313313
req = Net::HTTP::Get.new("/webrick.cgi/test")
314314
http.request(req) do |res|

0 commit comments

Comments
 (0)