Project

General

Profile

Feature #11917

Add Range#length as an alias for size

Added by dougo (Doug Orleans) over 3 years ago. Updated over 3 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:72581]

Description

I noticed that Range has a size method but no length, unlike most other Enumerable classes. I propose adding Range#length as an alias for Range#size. Any reason not to?


Files

History

Updated by avit (Andrew Vit) over 3 years ago

Attached patch for consideration. I made the aliases the same as Array.

Also available in: Atom PDF