summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAugustin Gottlieb <33221555+aguspe@users.noreply.github.com>2026-01-23 03:00:37 +0100
committerGitHub <noreply@github.com>2026-01-23 11:00:37 +0900
commit6ef0eb29c6579db58e2cf3407b41d58c687ee742 (patch)
tree1c8adf12caf9f2d0a83763bdddc1b64b559e123c /ext
parent1d497946af51e49e84da6a60096364bf1ad277f8 (diff)
Add early type validation for ObjectSpace.memsize_of_all klass argument
Diffstat (limited to 'ext')
-rw-r--r--ext/objspace/objspace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 457ffc2789..1143e4801d 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -137,6 +137,7 @@ memsize_of_all_m(int argc, VALUE *argv, VALUE self)
if (argc > 0) {
rb_scan_args(argc, argv, "01", &data.klass);
+ if (!NIL_P(data.klass)) rb_obj_is_kind_of(Qnil, data.klass);
}
each_object_with_flags(total_i, &data);