diff --git a/array.c b/array.c index 2e57572284..bd13a53430 100644 --- a/array.c +++ b/array.c @@ -2450,8 +2450,8 @@ sort_2(const void *ap, const void *bp, void *dummy) * elements returns +0+, the order of the elements is unpredictable. * * a = [ "d", "a", "e", "c", "b" ] - * a.sort! #=> ["a", "b", "c", "d", "e"] - * a.sort! { |x,y| y <=> x } #=> ["e", "d", "c", "b", "a"] + * a.sort! #=> ["a", "b", "c", "d", "e"] + * a.sort! { |a, b| b <=> a } #=> ["e", "d", "c", "b", "a"] * * See also Enumerable#sort_by. */ @@ -2534,8 +2534,8 @@ rb_ary_sort_bang(VALUE ary) * elements returns +0+, the order of the elements is unpredictable. * * a = [ "d", "a", "e", "c", "b" ] - * a.sort #=> ["a", "b", "c", "d", "e"] - * a.sort { |x,y| y <=> x } #=> ["e", "d", "c", "b", "a"] + * a.sort #=> ["a", "b", "c", "d", "e"] + * a.sort { |a, b| b <=> a } #=> ["e", "d", "c", "b", "a"] * * See also Enumerable#sort_by. */