From: mame@... Date: 2017-10-22T11:18:20+00:00 Subject: [ruby-dev:50303] [Ruby trunk Feature#2673][Closed] the length for an enumerator generated by Array#permutation and Array#combination Issue #2673 has been updated by mame (Yusuke Endoh). Status changed from Assigned to Closed This feature was accepted and introduced at #6636, wasn't it? Closing. ---------------------------------------- Feature #2673: the length for an enumerator generated by Array#permutation and Array#combination https://bugs.ruby-lang.org/issues/2673#change-67511 * Author: mrkn (Kenta Murata) * Status: Closed * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: next minor ---------------------------------------- =begin Array#permutation と Array#combination が生成する enumerator は要素数が確定できますが、 Enumerator#length が存在しないため、to_a で配列化しなければ長さを取得できません。 この欠点を解消するため、Array#permutation と Array#combination が生成する enumerator に対して length メソッドを特異メソッドとして追加するパッチを書きました。 差し支えないようでしたら trunk への取り込みを検討し頂けませんでしょうか。 よろしくお願いします。 =end ---Files-------------------------------- 0001-array.c-rb_ary_permutation-rb_ary_combiation-test-ru.patch (3.57 KB) enum_len.patch (4.96 KB) -- https://bugs.ruby-lang.org/