summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-01-15 11:27:31 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-01-15 11:27:31 -0500
commitcc7b19e048aae4fb6ee75edf8498008042c42ee1 (patch)
tree224e7a371d91118f47c7791b34d219ef11283ab1
parent5e61cc26c9f4b926ea6472675d3851b5fd684824 (diff)
[DOC] Improve docs for GC.compact
-rw-r--r--gc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gc.c b/gc.c
index 6245e2083b..a4de957340 100644
--- a/gc.c
+++ b/gc.c
@@ -11108,16 +11108,16 @@ heap_check_moved_i(void *vstart, void *vend, size_t stride, void *data)
/*
* call-seq:
- * GC.compact
+ * GC.compact -> hash
*
- * This function compacts objects together in Ruby's heap. It eliminates
+ * This function compacts objects together in Ruby's heap. It eliminates
* unused space (or fragmentation) in the heap by moving objects in to that
- * unused space. This function returns a hash which contains statistics about
- * which objects were moved. See <tt>GC.latest_compact_info</tt> for details
- * about compaction statistics.
+ * unused space.
*
- * This method is implementation specific and not expected to be implemented
- * in any implementation besides MRI.
+ * The returned +hash+ contains statistics about the objects that were moved;
+ * see GC.latest_compact_info.
+ *
+ * This method is only expected to work on CRuby.
*
* To test whether \GC compaction is supported, use the idiom:
*