From 3df9f3cc13b126cb270743c82f2c037c30a98103 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 21 Aug 2019 16:20:31 +0900 Subject: [PATCH] Separated initializing IDs --- ext/digest/digest.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/digest/digest.c b/ext/digest/digest.c index 7d285cfe74..b6f5a56062 100644 --- a/ext/digest/digest.c +++ b/ext/digest/digest.c @@ -735,7 +735,13 @@ Init_digest(void) id_digest = rb_intern("digest"); id_hexdigest = rb_intern("hexdigest"); id_digest_length = rb_intern("digest_length"); + id_metadata = rb_intern("metadata"); + InitVM(digest); +} +void +InitVM_digest(void) +{ /* * module Digest */ @@ -782,8 +788,6 @@ Init_digest(void) rb_define_singleton_method(rb_cDigest_Class, "digest", rb_digest_class_s_digest, -1); rb_define_singleton_method(rb_cDigest_Class, "hexdigest", rb_digest_class_s_hexdigest, -1); - id_metadata = rb_intern("metadata"); - /* class Digest::Base < Digest::Class */ rb_cDigest_Base = rb_define_class_under(rb_mDigest, "Base", rb_cDigest_Class);