Project

General

Profile

Actions

Misc #14673

open

Documentation for `Array#drop` / `drop_while` unclear in regard to modification

Added by sos4nt (Stefan Schüßler) over 6 years ago.

Status:
Open
Assignee:
-
[ruby-core:86489]

Description

The documentation for Array#drop says:

Drops first n elements from ary and returns the rest of the elements in an array.

It's unclear if the receiver is being changed or not (it is not). The documentation should be more explicit in that regard.

Maybe something like "Returns a new array containing all except the first n elements from ary".

This also applies to Array#drop_while.

No data to display

Actions

Also available in: Atom PDF

Like0