[前][次][番号順一覧][スレッド一覧]

ruby-changes:61429

From: Aaron <ko1@a...>
Date: Sat, 30 May 2020 08:00:00 +0900 (JST)
Subject: [ruby-changes:61429] 9b8825b6f9 (master): Update NEWS / documentation with GC.start(compact:true)

https://git.ruby-lang.org/ruby.git/commit/?id=9b8825b6f9

From 9b8825b6f94696c9659f93f5da9bf02644625f67 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Fri, 29 May 2020 15:59:14 -0700
Subject: Update NEWS / documentation with GC.start(compact:true)


diff --git a/NEWS.md b/NEWS.md
index 6856a29..ea69498 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -108,6 +108,14 @@ Outstanding ones only. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L108
         * Symbol#to_proc now returns a lambda Proc.
           [[Feature #16260]]
 
+* GC
+
+    * Modified method
+
+        * GC.start now takes an option `compact: true` to compact the heap.
+          For example `GC.start(compact: true)` will have the same effect as
+          `GC.compact`.
+
 ## Stdlib updates
 
 Outstanding ones only.
diff --git a/gc.rb b/gc.rb
index 23ed12f..881b865 100644
--- a/gc.rb
+++ b/gc.rb
@@ -26,6 +26,7 @@ module GC https://github.com/ruby/ruby/blob/trunk/gc.rb#L26
   #
   #  Use full_mark: false to perform a minor GC.
   #  Use immediate_sweep: false to defer sweeping (use lazy sweep).
+  #  Use compact: true to compact the heap (it implies a full mark and sweep).
   #
   #  Note: These keyword arguments are implementation and version dependent. They
   #  are not guaranteed to be future-compatible, and may be ignored if the
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]