From: Yukihiro Matsumoto Date: 2005-07-12T13:08:33+09:00 Subject: Re: accessing index inside map Hi, In message "Re: accessing index inside map" on Tue, 12 Jul 2005 12:56:50 +0900, nobuyoshi nakada writes: |> (1..6).each_with_index.map{|x,i|[2,5].include?(i) ? x : x*2} |> |> then. It's much simpler isn't it? | |Is this plan going on? | |I noticed that #map and #collect return an Array if no block |is given, instead of raising an exception. I agree with the plan, so that someone come up with the implementation before I do, I'd glad to merge it. ... boy, you did that. I think it's a good chance. Can you merge enumerator in the following steps? * merge ext/enumerator/enumerator.c to enum.c * remove ext/enumerator directory. * patch enum.c as you did. matz.