diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-01-26 12:13:21 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-01-28 06:49:28 +0000 |
commit | 81702b4b873c0e2b4247095b3b9462bcf34166ff (patch) | |
tree | dbf32627c838a2d583ea5f8764b01995e12665aa /ext/digest/md5 | |
parent | f475dc1cd219240b31a1958e6df00b8582a259f5 (diff) | |
download | ruby-81702b4b873c0e2b4247095b3b9462bcf34166ff.tar.gz |
[ruby/digest] Prefer `rb_const_get` over `rb_path2class` for direct constants
https://github.com/ruby/digest/commit/e5d30394b3
Diffstat (limited to 'ext/digest/md5')
-rw-r--r-- | ext/digest/md5/md5init.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c index 52cba78bf1..b81fd94864 100644 --- a/ext/digest/md5/md5init.c +++ b/ext/digest/md5/md5init.c @@ -53,9 +53,8 @@ Init_md5(void) mDigest = rb_define_module("Digest"); /* let rdoc know */ #endif mDigest = rb_digest_namespace(); - cDigest_Base = rb_path2class("Digest::Base"); + cDigest_Base = rb_const_get(mDigest, rb_intern_const("Base")); cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base); - rb_iv_set(cDigest_MD5, "metadata", rb_digest_make_metadata(&md5)); } |