зеркало из https://github.com/github/ruby.git
Only check class ancestors for ivar in memory_view
rb_class_get_superclass returns the immediate SUPER, including T_ICLASS. rb_ivar_lookup isn't implemented for T_ICLASS so it uses the default behaviour, which always returns Qnil. This commit avoids checking T_ICLASS for ivars.
This commit is contained in:
Родитель
8b4d2a5014
Коммит
fc184ca1f7
|
@ -784,7 +784,7 @@ lookup_memory_view_entry(VALUE klass)
|
|||
{
|
||||
VALUE entry_obj = rb_ivar_lookup(klass, id_memory_view, Qnil);
|
||||
while (NIL_P(entry_obj)) {
|
||||
klass = rb_class_get_superclass(klass);
|
||||
klass = rb_class_superclass(klass);
|
||||
|
||||
if (klass == rb_cBasicObject || klass == rb_cObject)
|
||||
return NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче