mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
8b4d2a5014
commit
fc184ca1f7
Notes:
git
2022-05-28 05:39:05 +09:00
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue