diff options
author | John Hawthorn <[email protected]> | 2022-02-06 13:48:09 -0800 |
---|---|---|
committer | John Hawthorn <[email protected]> | 2022-05-27 13:38:40 -0700 |
commit | fc184ca1f789ce6a89e83b9247b6bd172af7c659 () | |
tree | 0ba0054dec1a76964b74f92efbd1d6c038f983aa /memory_view.c | |
parent | 8b4d2a50148b9944dd2d1d2d6ebe7b09874ddfdd (diff) |
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.
Notes: Merged: https://.com/ruby/ruby/pull/5663
-rw-r--r-- | memory_view.c | 2 |
1 files changed, 1 insertions, 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); if (klass == rb_cBasicObject || klass == rb_cObject) return NULL; |