summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-07 11:54:25 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-07 12:09:08 +0900
commit75a2dff0e0ca310f82feb694e8b21655854df191 (patch)
treee2d97af6546f2f9fed49c72193d3593852670b24 /ext
parente13575bb7938e9e5b6a79bfca1b3793123f479da (diff)
downloadruby-75a2dff0e0ca310f82feb694e8b21655854df191.tar.gz
[ruby/openssl] Register global variables before assignment
https://github.com/ruby/openssl/commit/98099d3796
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 6c532aca94..71ddcb9f02 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -1170,8 +1170,8 @@ Init_openssl(void)
/*
* Init main module
*/
- mOSSL = rb_define_module("OpenSSL");
rb_global_variable(&mOSSL);
+ mOSSL = rb_define_module("OpenSSL");
rb_define_singleton_method(mOSSL, "fixed_length_secure_compare", ossl_crypto_fixed_length_secure_compare, 2);
/*
@@ -1208,12 +1208,12 @@ Init_openssl(void)
rb_define_module_function(mOSSL, "fips_mode", ossl_fips_mode_get, 0);
rb_define_module_function(mOSSL, "fips_mode=", ossl_fips_mode_set, 1);
+ rb_global_variable(&eOSSLError);
/*
* Generic error,
* common for all classes under OpenSSL module
*/
eOSSLError = rb_define_class_under(mOSSL,"OpenSSLError",rb_eStandardError);
- rb_global_variable(&eOSSLError);
/*
* Init debug core