зеркало из https://github.com/github/ruby.git
Refine assertion failure message
This commit is contained in:
Родитель
2c3d26cfd7
Коммит
b4eb7e2281
10
vm_method.c
10
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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче