Created
February 23, 2013 02:31
-
-
Save zzak/5018073 to your computer and use it in GitHub Desktop.
Array#&, #|, #- return order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: array.c | |
=================================================================== | |
--- array.c (revision 39413) | |
+++ array.c (working copy) | |
@@ -3801,7 +3801,8 @@ | |
* 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 @@ | |
* 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 @@ | |
* 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. | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment