Fix warning from Ruby master (will be 3.2.0) (#2785)

Fix: warning: undefining the allocator of T_DATA class Puma::MiniSSL::Engine
test_puma_server_ssl.rb - Fix warning: assigned but unused variable
This commit is contained in:
MSP-Greg 2022-01-02 08:52:17 -06:00 committed by GitHub
parent 4ac14482f1
commit cec07ac780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -608,7 +608,10 @@ void Init_mini_ssl(VALUE puma) {
ERR_load_crypto_strings();
mod = rb_define_module_under(puma, "MiniSSL");
eng = rb_define_class_under(mod, "Engine", rb_cObject);
rb_undef_alloc_func(eng);
sslctx = rb_define_class_under(mod, "SSLContext", rb_cObject);
rb_define_alloc_func(sslctx, sslctx_alloc);
rb_define_method(sslctx, "initialize", sslctx_initialize, 1);

View File

@ -349,7 +349,6 @@ class TestPumaServerSSLWithCertPemAndKeyPem < Minitest::Test
events = SSLEventsHelper.new STDOUT, STDERR
server = Puma::Server.new app, events
server.add_ssl_listener host, port, ctx
host_addrs = server.binder.ios.map { |io| io.to_io.addr[2] }
server.run
http = Net::HTTP.new host, server.connected_ports[0]