diff options
-rw-r--r-- | vm_method.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vm_method.c b/vm_method.c index e436538f56..fb6fe3b593 100644 --- a/vm_method.c +++ b/vm_method.c @@ -759,9 +759,11 @@ static rb_method_entry_t * rb_method_entry_alloc(ID called_id, VALUE owner, VALUE defined_class, rb_method_definition_t *def, bool complement) { if (def) method_definition_addref(def, complement); - VM_ASSERT(!defined_class || - NIL_P(defined_class) || // negative cache - RB_TYPE_P(defined_class, T_CLASS) || RB_TYPE_P(defined_class, T_ICLASS)); + if (RTEST(defined_class)) { + // not negative cache + VM_ASSERT(RB_TYPE_P(defined_class, T_CLASS) || RB_TYPE_P(defined_class, T_ICLASS), + "defined_class: %s", rb_obj_info(defined_class)); + } rb_method_entry_t *me = IMEMO_NEW(rb_method_entry_t, imemo_ment, defined_class); *((rb_method_definition_t **)&me->def) = def; me->called_id = called_id; @@ -1083,8 +1085,6 @@ rb_method_entry_make(VALUE klass, ID mid, VALUE defined_class, rb_method_visibil return me; } -static rb_method_entry_t *rb_method_entry_alloc(ID called_id, VALUE owner, VALUE defined_class, rb_method_definition_t *def, bool refined); - static st_table * overloaded_cme_table(void) { |