mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Fix the placeholder subclass entry skipping [Bug #18489]
This commit is contained in:
parent
e53962b9e1
commit
f3c77bd480
Notes:
git
2022-01-17 21:23:59 +09:00
2 changed files with 10 additions and 2 deletions
3
class.c
3
class.c
|
@ -1054,8 +1054,7 @@ 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->next) {
|
||||
RUBY_ASSERT(!iclass->klass);
|
||||
if (iclass && !iclass->klass) {
|
||||
iclass = iclass->next;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue