From a6e302509bd198fbff4edd10f69eff9286e34464 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Sat, 13 Jun 2026 21:06:19 +0900 Subject: [PATCH] [DOC] Improve docs for ObjectSpace::InternalObjectWrapper#internal_object_id --- ext/objspace/objspace.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c index 5e28eafad3..0f0470ed63 100644 --- a/ext/objspace/objspace.c +++ b/ext/objspace/objspace.c @@ -546,7 +546,16 @@ iow_inspect(VALUE self) return rb_sprintf("#", (void *)obj, rb_sym2str(type)); } -/* Returns the Object#object_id of the internal object. */ +/* + * call-seq: + * internal_object_id -> integer + * + * Returns the Object#object_id of the wrapped internal object. + * + * This value identifies the wrapped internal object, not the + * ObjectSpace::InternalObjectWrapper instance. Use it only for debugging and + * introspection; object ids of internal objects are implementation specific. + */ static VALUE iow_internal_object_id(VALUE self) {