@@ -419,28 +419,22 @@ count_imemo_objects_i(VALUE v, void *data)
419419
420420/*
421421 * call-seq:
422- * ObjectSpace.count_imemo_objects([ result_hash] ) -> hash
422+ * ObjectSpace.count_imemo_objects(result_hash = nil ) -> hash
423423 *
424- * Counts objects for each +T_IMEMO+ type.
424+ * Returns a hash containing the number of objects for each +T_IMEMO+ type.
425+ * The keys are Symbol objects of the +T_IMEMO+ type name.
426+ * +T_IMEMO+ objects are Ruby internal objects that are not visible to Ruby
427+ * programs.
425428 *
426- * This method is only for MRI developers interested in performance and memory
427- * usage of Ruby programs.
428- *
429- * It returns a hash as:
429+ * ObjectSpace.count_imemo_objects
430+ * # => {imemo_callcache: 5482, imemo_constcache: 1258, imemo_ment: 13906, ... }
430431 *
431- * {:imemo_ifunc=>8,
432- * :imemo_svar=>7,
433- * :imemo_cref=>509,
434- * :imemo_memo=>1,
435- * :imemo_throw_data=>1}
436- *
437- * If the optional argument, result_hash, is given, it is overwritten and
438- * returned. This is intended to avoid probe effect.
439- *
440- * The contents of the returned hash is implementation specific and may change
441- * in the future.
432+ * If the optional argument +result_hash+ is given, it is overwritten and
433+ * returned. This is intended to avoid the probe effect.
442434 *
443- * In this version, keys are symbol objects.
435+ * This method is intended for developers interested in performance and memory
436+ * usage of Ruby programs. The contents of the returned hash is implementation
437+ * specific and may change in the future.
444438 *
445439 * This method is only expected to work with C Ruby.
446440 */
0 commit comments