diff options
author | Aaron Patterson <[email protected]> | 2023-10-24 12:38:50 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2023-10-24 14:23:17 -0700 |
commit | 33bebee13aedb9f8a0d43cc6921910a690e6f73e (patch) | |
tree | d05812bf6b85f7db5654c18e4ed82815b6bcb253 | |
parent | afae8df373ba1b53b64bffa0e3df668d86585243 (diff) |
Use available constants
We don't need to intern "initialize" all the time because we already
have `idInitialize` available
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 3955a523d0..2fc9b96114 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -5493,7 +5493,7 @@ vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqv rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, visi); // Set max_iv_count on klasses based on number of ivar sets that are in the initialize method - if (id == rb_intern("initialize") && klass != rb_cObject && RB_TYPE_P(klass, T_CLASS) && (rb_get_alloc_func(klass) == rb_class_allocate_instance)) { + if (id == idInitialize && klass != rb_cObject && RB_TYPE_P(klass, T_CLASS) && (rb_get_alloc_func(klass) == rb_class_allocate_instance)) { RCLASS_EXT(klass)->max_iv_count = rb_estimate_iv_count(klass, (const rb_iseq_t *)iseqval); } |