Project

General

Profile

Actions

Feature #2673

closed

the length for an enumerator generated by Array#permutation and Array#combination

Added by mrkn (Kenta Murata) about 14 years ago. Updated over 6 years ago.

Status:
Closed
Target version:
[ruby-dev:40200]

Description

=begin
Array#permutation と Array#combination が生成する enumerator は要素数が確定できますが、
Enumerator#length が存在しないため、to_a で配列化しなければ長さを取得できません。

この欠点を解消するため、Array#permutation と Array#combination が生成する enumerator に対して
length メソッドを特異メソッドとして追加するパッチを書きました。
差し支えないようでしたら trunk への取り込みを検討し頂けませんでしょうか。

よろしくお願いします。
=end


Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #3715: Enumerator#size and #size=Rejected08/19/2010Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0