summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-19 12:54:01 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-19 12:54:01 +0000
commitb5388e85387c03c133a685c5577d405ce2874b8c (patch)
tree15e2d8b2d55a28725554c235c2aab954acbfae47 /enum.c
parent4f74adc503a13bbd19d451cab7e6ab6b685776bc (diff)
update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/enum.c b/enum.c
index 8b9f3b36f3..f5c4748308 100644
--- a/enum.c
+++ b/enum.c
@@ -2384,13 +2384,21 @@ slicebefore_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* the block returns true for the element,
* the element is beginning of a chunk.
*
- * The result enumerator yields the chunked elements as an array.
- * So "each" method can be called as follows.
+ * The === and block is called from the first element to the last element
+ * of _enum_.
+ * The result for the first element is ignored.
+ *
+ * The result enumerator yields the chunked elements as an array for +each+
+ * method.
+ * +each+ method can be called as follows.
*
* enum.slice_before(pattern).each {|ary| ... }
* enum.slice_before {|elt| bool }.each {|ary| ... }
* enum.slice_before(initial_state) {|elt, state| bool }.each {|ary| ... }
*
+ * Other methods of Enumerator class and Enumerable module,
+ * such as map, etc., are also usable.
+ *
* For example, iteration over ChangeLog entries can be implemented as
* follows.
*