Project

General

Profile

Actions

Feature #5574

closed

Make arrays comparable

Added by tokland (Arnau Sanchez) over 12 years ago. Updated about 12 years ago.

Status:
Rejected
Target version:
-
[ruby-core:40751]

Description

Why are arrays not comparable? Array already defines <=>, so it seems only natural to mix-in the Comparable module.

> [1, 2]  Array.send(:include, Comparable)
> [1, 2]  false

This was already discussed in the mailing list a while ago and people agreed it would be useful:

http://www.ruby-forum.com/topic/76535

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0