[#35027] [Ruby 1.9-Bug#4352][Open] [patch] Fix eval(s, b) backtrace; make eval(s, b) consistent with eval(s) — "James M. Lawrence" <redmine@...>

Bug #4352: [patch] Fix eval(s, b) backtrace; make eval(s, b) consistent w=

16 messages 2011/02/01

[#35114] [Ruby 1.9-Bug#4373][Open] http.rb:677: [BUG] Segmentation fault — Christian Fazzini <redmine@...>

Bug #4373: http.rb:677: [BUG] Segmentation fault

59 messages 2011/02/06

[#35171] [Ruby 1.9-Bug#4386][Open] encoding: directive does not affect regex expressions — mathew murphy <redmine@...>

Bug #4386: encoding: directive does not affect regex expressions

9 messages 2011/02/09

[#35237] [Ruby 1.9-Bug#4400][Open] nested at_exit hooks run in strange order — Suraj Kurapati <redmine@...>

Bug #4400: nested at_exit hooks run in strange order

12 messages 2011/02/15

[ruby-core:35144] Documentation Clarifications to Array methods rotate, rotate!, index, and rindex

From: Loren Sands-Ramshaw <lorensr@...>
Date: 2011-02-08 02:55:33 UTC
List: ruby-core #35144
Tue Feb  8 11:47:11 2011  Loren Sands-Ramshaw  <[email protected]>

       * array.c: documentation clarification in rotate, rotate!,
       index, and rindex.

Attachments (1)

ruby-changes.patch (2.41 KB, text/x-diff)
Index: array.c
===================================================================
--- array.c	(revision 30820)
+++ array.c	(working copy)
@@ -1147,9 +1147,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>.
  *
@@ -1196,7 +1196,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>.
@@ -1872,7 +1872,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"]
@@ -1897,11 +1897,11 @@
 
 /*
  *  call-seq:
- *     ary.rotate([n = 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 30820)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+Tue Feb  8 11:47:11 2011  Loren Sands-Ramshaw  <[email protected]>
+
+	* array.c: documentation clarification in rotate, rotate!,
+	index, and rindex.
+
 Wed Jan 26 10:36:28 2011  NARUSE, Yui  <[email protected]>
 
 	* string.c (=~): documentation fix; the return value is nil when

In This Thread

Prev Next