Project

General

Profile

Actions

Feature #1492

closed

enhancement of Array#drop

Added by matz (Yukihiro Matsumoto) almost 15 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:38506]

Description

=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:38505] Re: [Feature:trunk] enhancement of Array#drop"
on Wed, 20 May 2009 01:19:11 +0900, Tanaka Akira writes:

|>> [:a, :b, :a, :b].drop(1){|e| e == :b} #=> [:a, :a, :b]
|>> [:a, :b, :a, :b].drop(2){|e| e == :b} #=> [:a, :a]
|>
|> だそうですから、これは「引数で指定した範囲内で条件を満たす要
|> 素を削除する」メソッドになっています。うささんのほしいものは
|> こっちなんですか?
|
|これは、
|
| drop one element which equals :b
| drop two elements which equals :b
|
|と読むんじゃないですかねぇ。

おお。そんな読み方が。

そっちの方が意味はありそうですね。あんまり賛成じゃないのは変
わらないんですが。
=end


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #1488: enhancement of Array#dropClosedActions
Actions

Also available in: Atom PDF

Like0
Like0