Skip to content

Commit

Permalink
Fix warning from Ruby master (will be 3.2.0) (puma#2785)
Browse files Browse the repository at this point in the history
Fix: warning: undefining the allocator of T_DATA class Puma::MiniSSL::Engine
test_puma_server_ssl.rb - Fix warning: assigned but unused variable
  • Loading branch information
MSP-Greg authored and JuanitoFatas committed Sep 9, 2022
1 parent eb0dc7b commit 20ceb57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ext/puma_http11/mini_ssl.c
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion test/test_puma_server_ssl.rb
Expand Up @@ -349,7 +349,6 @@ def test_server_ssl_with_cert_pem_and_key_pem
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]
Expand Down

0 comments on commit 20ceb57

Please sign in to comment.