Assume that klass of dummy head is NULL
klass of the dummy head of the subclass entries should always be NULL.
This commit is contained in:
parent
a8703978b8
commit
f38dcc78c4
3
class.c
3
class.c
@ -1109,7 +1109,8 @@ rb_include_module(VALUE klass, VALUE module)
|
|||||||
if (RB_TYPE_P(klass, T_MODULE)) {
|
if (RB_TYPE_P(klass, T_MODULE)) {
|
||||||
rb_subclass_entry_t *iclass = RCLASS_SUBCLASSES(klass);
|
rb_subclass_entry_t *iclass = RCLASS_SUBCLASSES(klass);
|
||||||
// skip the placeholder subclass entry at the head of the list
|
// skip the placeholder subclass entry at the head of the list
|
||||||
if (iclass && !iclass->klass) {
|
if (iclass) {
|
||||||
|
RUBY_ASSERT(!iclass->klass);
|
||||||
iclass = iclass->next;
|
iclass = iclass->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user