Skip to content

Commit 07724d7

Browse files
[DOC] Document the :implementation key of GC.config
1 parent 5d1fde0 commit 07724d7

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

gc.rb

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ def self.stat_heap heap_name = nil, hash_or_key = nil
257257
# Configuration parameters are \GC implementation-specific and may change
258258
# without notice.
259259
#
260-
# This method can be called without parameters to retrieve the current config.
260+
# This method can be called without parameters to retrieve the current config
261+
# as a +Hash+ with +Symbol+ keys.
261262
#
262263
# This method can also be called with a +Hash+ argument to assign values to
263264
# valid config keys. Config keys missing from the passed +Hash+ will be left
@@ -275,7 +276,23 @@ def self.stat_heap heap_name = nil, hash_or_key = nil
275276
#
276277
# This method is only expected to work on CRuby.
277278
#
278-
# Valid config keys for Ruby's default \GC implementation are:
279+
# === \GC Implementation independent values
280+
#
281+
# The <code>GC.config</code> hash can also contain keys that are global and
282+
# read-only. These keys are not specific to any one \GC library implementation
283+
# and attempting to read them will raise +ArgumentError+.
284+
#
285+
# There is currently only one global, read-only key:
286+
#
287+
# [implementation]
288+
# Returns a +String+ containing the name of the currently loaded \GC library,
289+
# if one has been loaded using +RUBY_GC_LIBRARY+, and "default" in all other
290+
# cases
291+
#
292+
# === \GC Implementation specific values
293+
#
294+
# \GC libraries are expected to document their own configuration. Valid keys
295+
# for Ruby's default \GC implementation are:
279296
#
280297
# [rgengc_allow_full_mark]
281298
# Controls whether the \GC is allowed to run a full mark (young & old objects).

0 commit comments

Comments
 (0)