From: "Berger, Daniel" Date: 2003-07-09T04:00:36+09:00 Subject: Re: Array.each > Gentelmans: ........(There are any woman around there ?) > > I would love to be able to do: > > > a=(1..10) With this code, 'a' becomes a single Range. Try: a = *1..10. > a.each {| x , y| p x } > > 1 > 3 > 5 > 7 > 9 You'll have to redefine each() to yield two elements instead of one in order to get this behavior. Or you could just use step: 0.step(a.length,2){ |i| p a[i] } > (IMHO ... following the principle of the least surprise..may it > should be a native behavior .) You mean Ruby should automatically yield as many parameters as the block expects? You'll have to talk to Matz about that one. :) Regards, Dan