diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-23 02:50:34 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-23 02:50:34 +0000 |
commit | 933ff1d6d73eb43c1c57dc1ce8b25b172d7064bc (patch) | |
tree | 6c921d1a1d660db3d1e36b3dfccf4b1630a7719d | |
parent | c135883d37d061dd52e15ea7d2c4d38361cf04fb (diff) | |
download | ruby-933ff1d6d73eb43c1c57dc1ce8b25b172d7064bc.tar.gz |
* array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order
[RubySpec #7803
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | array.c | 8 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Sat Feb 23 10:50:00 2013 Zachary Scott <zachary@zacharyscott.net> + + * 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@zacharyscott.net> * object.c (rb_obj_comp): Documenting Object#<=> return values @@ -3801,7 +3801,8 @@ ary_recycle_hash(VALUE hash) * 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) * 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) * 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. * |