Skip to content

Commit ca5c908

Browse files
committed
array.c: [DOC] correct Array#sort rdoc [ci skip]
* array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] correct block return values, which may be a negative or positive integer, not ony -1 or +1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 5a0dc59 commit ca5c908

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Tue Sep 15 13:13:13 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] correct block
4+
return values, which may be a negative or positive integer, not
5+
ony -1 or +1.
6+
17
Tue Sep 15 12:49:10 2015 Jason Barnabe <jason.barnabe@gmail.com>
28

39
* array.c (rb_ary_sort_bang, rb_ary_sort): [DOC] Correct

array.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -2446,8 +2446,8 @@ sort_2(const void *ap, const void *bp, void *dummy)
24462446
* or using an optional code block.
24472447
*
24482448
* The block must implement a comparison between +a+ and +b+ and return
2449-
* +-1+ when +b+ follows +a+, +0+ when +a+ and +b+ are equivalent, or ++1+
2450-
* when +a+ follows +b+.
2449+
* an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
2450+
* are equivalent, or an integer greater than 0 when +a+ follows +b+.
24512451
*
24522452
* See also Enumerable#sort_by.
24532453
*
@@ -2527,8 +2527,8 @@ rb_ary_sort_bang(VALUE ary)
25272527
* or using an optional code block.
25282528
*
25292529
* The block must implement a comparison between +a+ and +b+ and return
2530-
* +-1+ when +b+ follows +a+, +0+ when +a+ and +b+ are equivalent, or ++1+
2531-
* when +a+ follows +b+.
2530+
* an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
2531+
* are equivalent, or an integer greater than 0 when +a+ follows +b+.
25322532
*
25332533
*
25342534
* See also Enumerable#sort_by.

0 commit comments

Comments
 (0)