aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ext/openssl/ossl_asn1.c2
-rw-r--r--test/openssl/test_asn1.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index ab45bd833c..e00c664c54 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -1823,8 +1823,8 @@ do{\
rb_define_method(cASN1EndOfContent, "initialize", ossl_asn1eoc_initialize, 0);
rb_define_method(cASN1EndOfContent, "to_der", ossl_asn1eoc_to_der, 0);
- class_tag_map = rb_hash_new();
rb_global_variable(&class_tag_map);
+ class_tag_map = rb_hash_new();
rb_hash_aset(class_tag_map, cASN1EndOfContent, INT2NUM(V_ASN1_EOC));
rb_hash_aset(class_tag_map, cASN1Boolean, INT2NUM(V_ASN1_BOOLEAN));
rb_hash_aset(class_tag_map, cASN1Integer, INT2NUM(V_ASN1_INTEGER));
diff --git a/test/openssl/test_asn1.rb b/test/openssl/test_asn1.rb
index 1170703775..ad76f07c05 100644
--- a/test/openssl/test_asn1.rb
+++ b/test/openssl/test_asn1.rb
@@ -635,6 +635,11 @@ class OpenSSL::TestASN1 < OpenSSL::TestCase
assert_equal data, seq.entries
end
+ def test_gc_stress
+ skip "very time consuming test"
+ assert_ruby_status([{"RUBY_DEBUG"=>"gc_stress"}, "--disable-gems", "-ropenssl", "-eexit"], timeout: 20)
+ end
+
private
def B(ary)