[ruby/openssl] make configs shareable when frozen

https://github.com/ruby/openssl/commit/654cb22e21
This commit is contained in:
HoneyryderChuck 2024-11-25 08:53:16 +00:00 committed by git
parent 9cae90f9d7
commit 5444885726
2 changed files with 10 additions and 1 deletions

View File

@ -22,7 +22,7 @@ static const rb_data_type_t ossl_config_type = {
{
0, nconf_free,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED,
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FROZEN_SHAREABLE,
};
CONF *

View File

@ -277,6 +277,15 @@ __EOC__
assert_equal(@it.sections.sort, c2.sections.sort)
end
if respond_to?(:ractor)
ractor
def test_ractor
assert(Ractor.shareable?(@it))
assert(Ractor.shareable?(OpenSSL::Config.parse("[empty]\n")))
assert(Ractor.shareable?(OpenSSL::Config::DEFAULT_CONFIG_FILE))
end
end
private
def in_tmpdir(*args)