Removed needless block arguments

This commit is contained in:
Hiroshi SHIBATA 2024-07-17 14:23:59 +09:00
Родитель 2a12e4ffec
Коммит af60317861
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -50,7 +50,7 @@ class TestOpenURISSL < Test::Unit::TestCase
end
def test_validation_failure
with_https(nil) {|srv, dr, url, server_thread, server_log|
with_https(nil) {|srv, dr, url|
setup_validation(srv, dr)
assert_raise(OpenSSL::SSL::SSLError) { URI.open("#{url}/data") {} }
sleep 0.5 unless RUBY_PLATFORM =~ /mswin|mingw/

Просмотреть файл

@ -343,7 +343,7 @@ module TestOpenURIUtils
def with_https_proxy(proxy_log_tester=lambda {|proxy_log, proxy_access_log| assert_equal([], proxy_log) })
proxy_log = []
proxy_access_log = []
with_https {|srv, dr, url, server_thread, server_log, threads|
with_https {|srv, dr, url|
srv.instance_variable_get(:@server).setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true)
cacert_filename = "#{dr}/cacert.pem"
open(cacert_filename, "w") {|f| f << CA_CERT }
@ -355,7 +355,7 @@ module TestOpenURIUtils
proxy = SimpleHTTPProxyServer.new(proxy_host, 0, proxy_log, proxy_access_log)
proxy_port = proxy.instance_variable_get(:@server).addr[1]
proxy_thread = proxy.start
threads << Thread.new {
thread = Thread.new {
proxy_thread.join
if proxy_log_tester
proxy_log_tester.call(proxy_log, proxy_access_log)
@ -367,6 +367,7 @@ module TestOpenURIUtils
ensure
proxy.shutdown
end
assert_join_threads([thread])
}
end
@ -390,7 +391,7 @@ module TestOpenURIUtils
}
threads << Thread.new {
begin
yield srv, dr, "https://#{host}:#{port}", server_thread, log, threads
yield srv, dr, "https://#{host}:#{port}"
ensure
srv.shutdown
end