Add a comment to ObjectSpace.each_object.

This commit is contained in:
yui-knk
2014-05-06 12:41:23 +09:00
parent a776e3a1eb
commit c2732a160a
@@ -128,6 +128,20 @@ os_each_object_cb(mrb_state *mrb, struct RBasic *obj, void *ud)
++d->count;
}
/*
* call-seq:
* ObjectSpace.each_object([module]) {|obj| ... } -> fixnum
*
* Calls the block once for each object in this Ruby process.
* Returns the number of objects found.
* If the optional argument +module+ is given,
* calls the block for only those classes or modules
* that match (or are a subclass of) +module+.
*
* If no block is given, ArgumentError is raised.
*
*/
static mrb_value
os_each_object(mrb_state *mrb, mrb_value self)
{