Project

General

Profile

Misc #15630

Clarification on Comparable documentation

Added by shugo (Shugo Maeda) 19 days ago. Updated 18 days ago.

Status:
Open
Priority:
Normal
Assignee:
-
[ruby-core:91650]

Description

The documentation of Comparable#> says:

/*
 *  call-seq:
 *     obj > other    -> true or false
 *
 *  Compares two objects based on the receiver's <code><=></code>
 *  method, returning true if it returns 1.
 */

However, Comparable#> returns if and only if <=> returns any value greater than 0.
It's better to fix the documentation, isn't it?

History

#1

Updated by shugo (Shugo Maeda) 18 days ago

  • Subject changed from Clarifications on Comparable documentation to Clarification on Comparable documentation

Also available in: Atom PDF