[#67346] Future of test suites for Ruby — Charles Oliver Nutter <headius@...>

I'll try to be brief so we can discuss all this. tl;dr: RubySpec is

19 messages 2015/01/05

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

From: ayumu.aizawa@...
Date: 2015-01-04 05:53:49 UTC
List: ruby-core #67320
Issue #10125 has been updated by Ayumu AIZAWA.

Related to Bug #9989: Docs give wrong information for sort block return val=
ues added

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

* Author: Maxime R=C3=A9ty
* Status: Assigned
* Priority: Normal
* Assignee: Zachary Scott
* Category: doc
* Target version:=20
* 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 <=3D> b will return -1 if a is lower than b, i.e. b follows a (in the sor=
ted array).
a <=3D> b will return 1 if a is greater than b, i.e. a follows b (in the so=
rted 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)


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

In This Thread

Prev Next