Skip to content

Commit

Permalink
[DOC] Document the :implementation key of GC.config
Browse files Browse the repository at this point in the history
  • Loading branch information
eightbitraptor committed Dec 20, 2024
1 parent 2f6c694 commit 2a62a1a
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions gc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ def self.stat_heap heap_name = nil, hash_or_key = nil
# Configuration parameters are \GC implementation-specific and may change
# without notice.
#
# This method can be called without parameters to retrieve the current config.
# This method can be called without parameters to retrieve the current config
# as a +Hash+ with +Symbol+ keys.
#
# This method can also be called with a +Hash+ argument to assign values to
# valid config keys. Config keys missing from the passed +Hash+ will be left
Expand All @@ -275,7 +276,23 @@ def self.stat_heap heap_name = nil, hash_or_key = nil
#
# This method is only expected to work on CRuby.
#
# Valid config keys for Ruby's default \GC implementation are:
# === \GC Implementation independent values
#
# The <code>GC.config</code> hash can also contain keys that are global and
# read-only. These keys are not specific to any one \GC library implementation
# and attempting to read them will raise +ArgumentError+.
#
# There is currently only one global, read-only key:
#
# [implementation]
# Returns a +String+ containing the name of the currently loaded \GC library,
# if one has been loaded using +RUBY_GC_LIBRARY+, and "default" in all other
# cases
#
# === \GC Implementation specific values
#
# \GC libraries are expected to document their own configuration. Valid keys
# for Ruby's default \GC implementation are:
#
# [rgengc_allow_full_mark]
# Controls whether the \GC is allowed to run a full mark (young & old objects).
Expand Down

0 comments on commit 2a62a1a

Please sign in to comment.