[前][次][番号順一覧][スレッド一覧]

ruby-changes:25785

From: eregon <ko1@a...>
Date: Sun, 25 Nov 2012 22:29:11 +0900 (JST)
Subject: [ruby-changes:25785] eregon:r37842 (trunk): * array.c: fixes for the updated documentation in r35858:

eregon	2012-11-25 22:28:59 +0900 (Sun, 25 Nov 2012)

  New Revision: 37842

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37842

  Log:
    * array.c: fixes for the updated documentation in r35858:
      Typos and #take/#drop accept to take/drop 0 elements.

  Modified files:
    trunk/ChangeLog
    trunk/array.c

Index: array.c
===================================================================
--- array.c	(revision 37841)
+++ array.c	(revision 37842)
@@ -1326,9 +1326,9 @@
  *  Returns the _index_ of the first object in +ary+ such that the object is
  *  <code>==</code> to +obj+.
  *
- *  If a block is given instead of an argument, returns the _index_ of first
- *  the object for which the block returns +true+.  Returns +nil+ if no match
- *  is found.
+ *  If a block is given instead of an argument, returns the _index_ of the
+ *  first object for which the block returns +true+.  Returns +nil+ if no
+ *  match is found.
  *
  *  See also Array#rindex.
  *
@@ -1375,8 +1375,9 @@
  *
  *  Returns the _index_ of the last object in +self+ <code>==</code> to +obj+.
  *
- *  If a block is given instead of an argument, returns _index_ of first object
- *  for which block returns +true+, starting from the last object.
+ *  If a block is given instead of an argument, returns the _index_ of the
+ *  first object for which the block returns +true+, starting from the last
+ *  object.
  *
  *  Returns +nil+ if no match is found.
  *
@@ -2156,8 +2157,8 @@
  *  call-seq:
  *     ary.rotate(count=1)    -> new_ary
  *
- *  Returns new array by rotating +self+ so that the element at +count+ is the
- *  first element of the new array.
+ *  Returns a new array by rotating +self+ so that the element at +count+ is
+ *  the first element of the new array.
  *
  *  If +count+ is negative then it rotates in the opposite direction, starting
  *  from the end of +self+ where +-1+ is the last element.
@@ -4279,7 +4280,7 @@
  *
  *  Shuffles elements in +self+ in place.
  *
- *  The optional +rng+ argument will be used as random number generator.
+ *  The optional +rng+ argument will be used as the random number generator.
  */
 
 static VALUE
@@ -5086,7 +5087,7 @@
  *
  *  Returns first +n+ elements from the array.
  *
- *  If a non-positive number is given, raises an ArgumentError.
+ *  If a negative number is given, raises an ArgumentError.
  *
  *  See also Array#drop
  *
@@ -5141,7 +5142,7 @@
  *  Drops first +n+ elements from +ary+ and returns the rest of the elements in
  *  an array.
  *
- *  If a non-positive number is given, raises an ArgumentError.
+ *  If a negative number is given, raises an ArgumentError.
  *
  *  See also Array#take
  *
@@ -5218,10 +5219,10 @@
  *     Array.new(3)       #=> [nil, nil, nil]
  *     Array.new(3, true) #=> [0, 0, 0]
  *
- *  Note that the second argument populates the array with references the same
- *  object.  Therefore, it is only recommended in cases when you need to
- *  instantiate arrays with natively immutable objects such Symbols, numbers,
- *  true or false.
+ *  Note that the second argument populates the array with references to the
+ *  same object.  Therefore, it is only recommended in cases when you need to
+ *  instantiate arrays with natively immutable objects such as Symbols,
+ *  numbers, true or false.
  *
  *  To create an array with separate objects a block can be passed instead.
  *  This method is safe to use with mutable objects such as hashes, strings or
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37841)
+++ ChangeLog	(revision 37842)
@@ -1,3 +1,8 @@
+Sun Nov 25 22:27:33 2012  Benoit Daloze  <eregontp@g...>
+
+	* array.c: fixes for the updated documentation in r35858:
+	  Typos and #take/#drop accept to take/drop 0 elements.
+
 Sun Nov 25 19:43:29 2012  Kazuki Tsujimoto  <kazuki@c...>
 
 	* NEWS: add a news about iconv.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]