merge revision(s) 3b7892b6e4: [Backport #20871]

Fix a bug in rb_include_module that stops nested inclusion into module subclasses

	This bug was present since the code was originally added by me
	in 3556a834a2.

	Fixes [Bug #20871]
This commit is contained in:
nagachika 2024-11-30 14:29:18 +09:00
parent 1fc0895971
commit bb065f0844
3 changed files with 14 additions and 2 deletions

View file

@ -1145,8 +1145,8 @@ rb_include_module(VALUE klass, VALUE module)
iclass = iclass->next;
}
int do_include = 1;
while (iclass) {
int do_include = 1;
VALUE check_class = iclass->klass;
/* During lazy sweeping, iclass->klass could be a dead object that
* has not yet been swept. */