Commit 12915f95 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2203 from yui-knk/add-call-seq

Add a comment to ObjectSpace.each_object.
parents a776e3a1 c2732a16
...@@ -128,6 +128,20 @@ os_each_object_cb(mrb_state *mrb, struct RBasic *obj, void *ud) ...@@ -128,6 +128,20 @@ os_each_object_cb(mrb_state *mrb, struct RBasic *obj, void *ud)
++d->count; ++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 static mrb_value
os_each_object(mrb_state *mrb, mrb_value self) os_each_object(mrb_state *mrb, mrb_value self)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment