mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
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:
parent
1fc0895971
commit
bb065f0844
3 changed files with 14 additions and 2 deletions
2
class.c
2
class.c
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue