Project

General

Profile

Actions

Misc #15630

closed

Clarification on Comparable documentation

Added by shugo (Shugo Maeda) about 5 years ago. Updated about 5 years ago.

Status:
Closed
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?

Actions

Also available in: Atom PDF

Like0
Like0Like0