From: Yukihiro Matsumoto Date: 2010-04-01T00:22:49+09:00 Subject: [ruby-dev:40883] Re: [Feature #2673] the length for an enumerator generated by Array#permutation and Array#combination Hi, In message "Re: [ruby-dev:40882] [Feature #2673] the length for an enumerator generated by Array#permutation and Array#combination" on Thu, 1 Apr 2010 00:11:02 +0900, Marc-Andre Lafortune writes: |I wanted to propose that Enumerator had a #length/#size method that would return nil or the size of the enumeration, when known. My (unfinished) proposal was to allow a block though, so that the result would always be valid, even if the source object was modified. Object#to_enum would accept a block and use that to calculate the length. This propose has been suspended for 1.9.2 since the resule may not be trustworthy considering the source modification after generating enumerator. I am not sure passing block is a good idea or not, yet. It's not intuitive for me at the first glance. matz.