Project

General

Profile

Actions

Feature #11917

open

Add Range#length as an alias for size

Added by dougo (Doug Orleans) about 8 years ago. Updated about 8 years ago.

Status:
Open
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

Updated by avit (Andrew Vit) about 8 years ago

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

Actions

Also available in: Atom PDF

Like0
Like0