summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/array.c b/array.c
index 182046856c..9528ea59b6 100644
--- a/array.c
+++ b/array.c
@@ -2442,14 +2442,14 @@ sort_2(const void *ap, const void *bp, void *dummy)
* an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
* are equivalent, or an integer greater than 0 when +a+ follows +b+.
*
- * The result is not guaranteed as stable. When comparison of two
+ * The result is not guaranteed to be stable. When the comparison of two
* elements returns +0+, the order of the elements is unpredictable.
*
- * See also Enumerable#sort_by.
- *
* a = [ "d", "a", "e", "c", "b" ]
* a.sort! #=> ["a", "b", "c", "d", "e"]
* a.sort! { |x,y| y <=> x } #=> ["e", "d", "c", "b", "a"]
+ *
+ * See also Enumerable#sort_by.
*/
VALUE
@@ -2526,14 +2526,14 @@ rb_ary_sort_bang(VALUE ary)
* an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
* are equivalent, or an integer greater than 0 when +a+ follows +b+.
*
- * The result is not guaranteed as stable. When comparison of two
+ * The result is not guaranteed to be stable. When the comparison of two
* elements returns +0+, the order of the elements is unpredictable.
*
- * See also Enumerable#sort_by.
- *
* a = [ "d", "a", "e", "c", "b" ]
* a.sort #=> ["a", "b", "c", "d", "e"]
* a.sort { |x,y| y <=> x } #=> ["e", "d", "c", "b", "a"]
+ *
+ * See also Enumerable#sort_by.
*/
VALUE
@@ -2685,11 +2685,12 @@ sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, dummy))
* Sorts +self+ in place using a set of keys generated by mapping the
* values in +self+ through the given block.
*
- * The result is not guaranteed as stable. When two keys are equal,
+ * The result is not guaranteed to be stable. When two keys are equal,
* the order of the corresponding elements is unpredictable.
*
* If no block is given, an Enumerator is returned instead.
*
+ * See also Enumerable#sort_by.
*/
static VALUE