mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Tweaks for GC.count
This commit is contained in:
parent
40d07f268e
commit
7595ac9a9e
1 changed files with 7 additions and 2 deletions
9
gc.rb
9
gc.rb
|
@ -104,9 +104,14 @@ module GC
|
||||||
end
|
end
|
||||||
|
|
||||||
# call-seq:
|
# call-seq:
|
||||||
# GC.count -> Integer
|
# self.count -> integer
|
||||||
|
#
|
||||||
|
# Returns the total number of times garbage collection has occurred:
|
||||||
|
#
|
||||||
|
# GC.count # => 385
|
||||||
|
# GC.start
|
||||||
|
# GC.count # => 386
|
||||||
#
|
#
|
||||||
# Returns the number of times \GC has occurred since the process started.
|
|
||||||
def self.count
|
def self.count
|
||||||
Primitive.gc_count
|
Primitive.gc_count
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue