[ruby-core:79874] [Ruby trunk Bug#10125][Closed] Array#sort and #sort! documentation issue

From: sto.mar@...
Date: 2017-03-02 13:01:36 UTC
List: ruby-core #79874
Issue #10125 has been updated by Marcus Stollsteimer.

Status changed from Assigned to Closed

----------------------------------------
Bug #10125: Array#sort and #sort! documentation issue
https://bugs.ruby-lang.org/issues/10125#change-63307

* Author: Maxime R辿ty
* Status: Closed
* Priority: Normal
* Assignee: Zachary Scott
* Target version: 
* ruby -v: 2.1.2
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
The documentation about the values that should be returned by the block is backwards.

a <=> b will return -1 if a is lower than b, i.e. b follows a (in the sorted array).
a <=> b will return 1 if a is greater than b, i.e. a follows b (in the sorted array).

Using the "follows" verbal form might not be the best choice here, but I'd rather let a native english speaker rephrase it if needed.

This part of the documentation is backwards since the 2.0.0 release (commit 53b61ccb).

Thanks.

---Files--------------------------------
0001-array.c-Fixing-documentation-about-comparisons-in-so.patch (1.25 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next