diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2022-03-16 15:18:34 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2022-03-16 15:19:30 -0400 |
| commit | f38dcc78c4302bc7d5059d540507396bd9ea930e (patch) | |
| tree | efc72d793b4975efab20982c5ba900b26174ad72 | |
| parent | a8703978b8c338c829af4cc487bee30f1d20dd72 (diff) | |
Assume that klass of dummy head is NULL
klass of the dummy head of the subclass entries should always be NULL.
| -rw-r--r-- | class.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1109,7 +1109,8 @@ rb_include_module(VALUE klass, VALUE module) if (RB_TYPE_P(klass, T_MODULE)) { rb_subclass_entry_t *iclass = RCLASS_SUBCLASSES(klass); // skip the placeholder subclass entry at the head of the list - if (iclass && !iclass->klass) { + if (iclass) { + RUBY_ASSERT(!iclass->klass); iclass = iclass->next; } |
