mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 2 additions and 1 deletions
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…
Reference in a new issue