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

ruby-changes:27363

From: zzak <ko1@a...>
Date: Sat, 23 Feb 2013 11:50:46 +0900 (JST)
Subject: [ruby-changes:27363] zzak:r39415 (trunk): * array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order

zzak	2013-02-23 11:50:34 +0900 (Sat, 23 Feb 2013)

  New Revision: 39415

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

  Log:
    * array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order
      [RubySpec #7803

  Modified files:
    trunk/ChangeLog
    trunk/array.c

Index: array.c
===================================================================
--- array.c	(revision 39414)
+++ array.c	(revision 39415)
@@ -3801,7 +3801,8 @@ ary_recycle_hash(VALUE hash) https://github.com/ruby/ruby/blob/trunk/array.c#L3801
  *  Array Difference
  *
  *  Returns a new array that is a copy of the original array, removing any
- *  items that also appear in +other_ary+.
+ *  items that also appear in +other_ary+. The order is preserved from the
+ *  original array.
  *
  *  It compares elements using their #hash and #eql? methods for efficiency.
  *
@@ -3833,7 +3834,8 @@ rb_ary_diff(VALUE ary1, VALUE ary2) https://github.com/ruby/ruby/blob/trunk/array.c#L3834
  *     ary & other_ary      -> new_ary
  *
  *  Set Intersection --- Returns a new array containing elements common to the
- *  two arrays, excluding any duplicates.
+ *  two arrays, excluding any duplicates. The order is preserved from the
+ *  original array.
  *
  *  It compares elements using their #hash and #eql? methods for efficiency.
  *
@@ -3875,7 +3877,7 @@ rb_ary_and(VALUE ary1, VALUE ary2) https://github.com/ruby/ruby/blob/trunk/array.c#L3877
  *     ary | other_ary     -> new_ary
  *
  *  Set Union --- Returns a new array by joining +ary+ with +other_ary+,
- *  excluding any duplicates.
+ *  excluding any duplicates and preserving the order from the original array.
  *
  *  It compares elements using their #hash and #eql? methods for efficiency.
  *
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39414)
+++ ChangeLog	(revision 39415)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Feb 23 10:50:00 2013  Zachary Scott  <zachary@z...>
+
+	* array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order
+	  [RubySpec #7803]
+
 Sat Feb 23 10:17:00 2013  Zachary Scott  <zachary@z...>
 
 	* object.c (rb_obj_comp): Documenting Object#<=> return values

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

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