ruby-changes:18805
From: kosaki <ko1@a...>
Date: Wed, 9 Feb 2011 12:13:11 +0900 (JST)
Subject: [ruby-changes:18805] Ruby:r30830 (trunk): * array.c: documentation clarification in rotate, rotate!,
kosaki 2011-02-09 12:12:59 +0900 (Wed, 09 Feb 2011) New Revision: 30830 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30830 Log: * array.c: documentation clarification in rotate, rotate!, index, and rindex. [ruby-core:35144] Modified files: trunk/ChangeLog trunk/array.c Index: array.c =================================================================== --- array.c (revision 30829) +++ array.c (revision 30830) @@ -1149,9 +1149,9 @@ * ary.index {|item| block} -> int or nil * ary.index -> an_enumerator * - * Returns the index of the first object in +self+ such that is + * Returns the index of the first object in +self+ such that the object is * <code>==</code> to <i>obj</i>. If a block is given instead of an - * argument, returns first object for which <em>block</em> is true. + * argument, returns index of first object for which <em>block</em> is true. * Returns <code>nil</code> if no match is found. * See also <code>Array#rindex</code>. * @@ -1198,7 +1198,7 @@ * * Returns the index of the last object in +self+ * <code>==</code> to <i>obj</i>. If a block is given instead of an - * argument, returns first object for which <em>block</em> is + * argument, returns index of first object for which <em>block</em> is * true, starting from the last object. * Returns <code>nil</code> if no match is found. * See also <code>Array#index</code>. @@ -1911,7 +1911,7 @@ * * Rotates +self+ in place so that the element at +cnt+ comes first, * and returns +self+. If +cnt+ is negative then it rotates in - * counter direction. + * the opposite direction. * * a = [ "a", "b", "c", "d" ] * a.rotate! #=> ["b", "c", "d", "a"] @@ -1936,11 +1936,11 @@ /* * call-seq: - * ary.rotate([cnt = 1]) -> new_ary + * ary.rotate(cnt=1) -> new_ary * - * Returns new array by rotating +self+, whose first element is the - * element at +cnt+ in +self+. If +cnt+ is negative then it rotates - * in counter direction. + * Returns new array by rotating +self+ so that the element at + * +cnt+ in +self+ is the first element of the new array. If +cnt+ + * is negative then it rotates in the opposite direction. * * a = [ "a", "b", "c", "d" ] * a.rotate #=> ["b", "c", "d", "a"] Index: ChangeLog =================================================================== --- ChangeLog (revision 30829) +++ ChangeLog (revision 30830) @@ -1,3 +1,8 @@ +Tue Feb 8 11:47:11 2011 Loren Sands-Ramshaw <lorensr@g...> + + * array.c: documentation clarification in rotate, rotate!, + index, and rindex. [ruby-core:35144] + Wed Feb 9 09:45:43 2011 NAKAMURA Usaku <usa@r...> * test/rdoc/test_rdoc_encoding.rb: remove unnecessary (and wrong) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/