From: Shin-ichiro Hara Date: 1998-12-06T19:50:16+09:00 Subject: [ruby-dev:3746] Re: List() 原です。 > そうか、each_with_index を前田さんの each_with_index2 にして > おいても、each 側は yield(x, y) と yield([[x, y]]) で所望の > 物が実現できますね。 > > もしかしてこれで解決?(^^; やっぱり each_with_index2 だと、 [1,2,3].each_with_index2 {|x| } と [[1],[2],[3]].each_with_index2 {|x| } の区別が無くなってしまいますね。両者が正常に動作するような Array#each の定義の仕方はかなりややこしい。