From 7277821447a7f40e605d9ff17a6b3b2b68e5c286 Mon Sep 17 00:00:00 2001 From: Mohamed Hafez Date: Wed, 18 Sep 2024 17:02:41 +0200 Subject: [PATCH] Mark as ractor-safe --- ext/mri/bcrypt_ext.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/mri/bcrypt_ext.c b/ext/mri/bcrypt_ext.c index 757b068..3e5ac1c 100644 --- a/ext/mri/bcrypt_ext.c +++ b/ext/mri/bcrypt_ext.c @@ -111,6 +111,10 @@ static VALUE bc_crypt(VALUE self, VALUE key, VALUE setting) { /* Create the BCrypt and BCrypt::Engine modules, and populate them with methods. */ void Init_bcrypt_ext(){ +#ifdef HAVE_RB_EXT_RACTOR_SAFE + rb_ext_ractor_safe(true); +#endif + mBCrypt = rb_define_module("BCrypt"); cBCryptEngine = rb_define_class_under(mBCrypt, "Engine", rb_cObject);