Add Ruby 2.7.5 patches

This commit is contained in:
Stan Hu 2021-12-04 08:11:19 -08:00
parent de93cf17ab
commit ef05340775
No known key found for this signature in database
GPG key ID: 8D3931AD39CC7A20
2 changed files with 283 additions and 0 deletions

View file

@ -0,0 +1,25 @@
diff --git a/class.c b/class.c
index c866d1d727..37ff3c5ade 100644
--- a/class.c
+++ b/class.c
@@ -27,6 +27,7 @@
#include "ruby/st.h"
#include "constant.h"
#include "vm_core.h"
+#include "vm_debug.h"
#include "id_table.h"
#include <ctype.h>
@@ -119,6 +120,12 @@ rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE arg)
while (cur) {
VALUE curklass = cur->klass;
cur = cur->next;
+
+ if (curklass == 0) {
+ fprintf(stderr, "=== Detected NULL subclass:\n");
+ dp(curklass);
+ }
+
f(curklass, arg);
}
}