Feature #11067 ยป ruby-changes.patch
| ChangeLog | ||
|---|---|---|
|
Sun Apr 13 10:09:53 2015 Richard Schneeman <richard.schneeman@gmail.com>
|
||
|
* gc.c: Add documentation to ObjectSpace.count_objects. [ci skip]
|
||
|
Mon Apr 13 22:44:07 2015 Tanaka Akira <akr@fsij.org>
|
||
|
* test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.
|
||
| gc.c | ||
|---|---|---|
|
* call-seq:
|
||
|
* ObjectSpace.count_objects([result_hash]) -> hash
|
||
|
*
|
||
|
* Counts all objects grouped by type.
|
||
|
* Counts objects for each type.
|
||
|
*
|
||
|
* It returns a hash, such as:
|
||
|
* {
|
||
| ... | ... | |
|
* # ...
|
||
|
* }
|
||
|
*
|
||
|
* The +:TOTAL+ key contains the count of all currently allocated and
|
||
|
* previously freed objects. The contents of the returned hash are
|
||
|
* implementation specific. It may be changed in future.
|
||
|
* The contents of the returned hash are implementation specific.
|
||
|
* It may be changed in future.
|
||
|
*
|
||
|
* If the optional argument +result_hash+ is given,
|
||
|
* it is overwritten and returned. This is intended to avoid probe effect.
|
||
|
*
|
||
|
* h = {}
|
||
|
* ObjectSpace.count_objects(h)
|
||
|
* puts h
|
||
|
* # => { :TOTAL=>10000, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249 }
|
||
|
*
|
||
|
* This method is only expected to work on C Ruby.
|
||
|
*
|
||
|
*/
|
||