ruby-changes:15102
From: akr <ko1@a...>
Date: Fri, 19 Mar 2010 21:54:12 +0900 (JST)
Subject: [ruby-changes:15102] Ruby:r26979 (trunk): update rdoc.
akr 2010-03-19 21:54:01 +0900 (Fri, 19 Mar 2010) New Revision: 26979 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26979 Log: update rdoc. Modified files: trunk/enum.c Index: enum.c =================================================================== --- enum.c (revision 26978) +++ enum.c (revision 26979) @@ -2384,13 +2384,21 @@ * 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. * -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/