summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2024-11-19 13:58:19 -0800
committerJeremy Evans <[email protected]>2024-11-20 07:59:31 -0800
commit3b7892b6e4d1a1a5d6019987f9b46ed443dd104f (patch)
tree66717b779afca265fa1cbe77262f85d5d595bef3 /class.c
parent9db056f2ea2c1a9f9887a3436b212f52c3ad3b8d (diff)
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 3556a834a2847e52162d1d3302d4c64390df1694. Fixes [Bug #20871]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12125
Diffstat (limited to 'class.c')
-rw-r--r--class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class.c b/class.c
index c0920e111d..b39e693837 100644
--- a/class.c
+++ b/class.c
@@ -1204,8 +1204,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. */