summaryrefslogtreecommitdiff
path: root/ext/digest/sha2
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/sha2')
-rw-r--r--ext/digest/sha2/sha2init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/digest/sha2/sha2init.c b/ext/digest/sha2/sha2init.c
index d7666aadf9e..4b140318117 100644
--- a/ext/digest/sha2/sha2init.c
+++ b/ext/digest/sha2/sha2init.c
@@ -40,8 +40,8 @@ Init_sha2()
#define DEFINE_ALGO_CLASS(bitlen) \
cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
\
- rb_cvar_declare(cDigest_SHA##bitlen, id_metadata, \
- Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen));
+ rb_cvar_set(cDigest_SHA##bitlen, id_metadata, \
+ Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen), Qtrue);
FOREACH_BITLEN(DEFINE_ALGO_CLASS)
}