[ruby/openssl] make configs shareable when frozen
https://github.com/ruby/openssl/commit/654cb22e21
This commit is contained in:
parent
9cae90f9d7
commit
5444885726
@ -22,7 +22,7 @@ static const rb_data_type_t ossl_config_type = {
|
|||||||
{
|
{
|
||||||
0, nconf_free,
|
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 *
|
CONF *
|
||||||
|
@ -277,6 +277,15 @@ __EOC__
|
|||||||
assert_equal(@it.sections.sort, c2.sections.sort)
|
assert_equal(@it.sections.sort, c2.sections.sort)
|
||||||
end
|
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
|
private
|
||||||
|
|
||||||
def in_tmpdir(*args)
|
def in_tmpdir(*args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user