Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr updates GC's signatures, unit tests, and adds in the
Writer
test type (which implements_Writer
).Two methods,
GC.latest_gc_info
andGC.stat
technically can accept any hash, and just add their respective keys/values (e.g.[K,V] (Hash[K, V]) -> Hash[K | Symbol, V | Integer]
). However, this is currently not testable, and the added complication of supporting it isn't worth the very niche—but technically correct—signature.In addition to removing the occasional leading
::
, this has the following changes:GC::compact_info
type alias was added for the return value ofGC.compact
and other methodsGC::{INTERNAL_CONSTANTS,OPTS}
: Moved inside the classGC.start
: Removed duplicate argument names.GC.stat
: Gave actual names to arguments, Hash variant is now nilable.GC.stress
:bool
notTrueClass | FalseClass
GC.stress=
: SplitInteger
andbool
cases apart to fix return value.GC.verify_compaction_references
: Added optionaltoward
,double_heap
andexpand_heap
keyword argumentsGC.latest_gc_info
:nil
is now accepted, removedK
from theHash[K | Symbol, unty]ed
function.GC.garbage_collect
: Removed duplicate argument names.GC::Profiler
was moved inside the class, andauto_compact
-related functions were added.