On 6 =C9=EF=FD=ED, 01:11, Yukihiro Matsumoto <m... / ruby-lang.org> wrote:
> Hi,
>
> In message "Re: CORE - Altering Behaviour of "each do" (default param "it=
em")"
> =A0 =A0 on Sat, 4 Jun 2011 20:50:25 +0900, Ilias Lazaridis <il...@lazarid=
is.com> writes:
>
> |#Question: How can I alter the behaviour of "each" in the following
> |way:
> |names.each do
> | =A0print item =A0 =A0 =A0 =A0 # "item" is used by default
> |end
> |
> |Is this possible, without going to C-level?
>
> It's possible but you have to redefine the each method. =A0

ok

> That reminds me Groovy's it. =A0

I don't know "Groovy", but I dislike the "it", as it cannot be spoken
like "each item" or "each value".

I've just noticed repetitions within code like that:

names.each { |name| puts name} # 3 times "name(s)"

names.each { puts item }

names.each { puts e) # e =3D entry

> Currently I have no plan to change the core like that.

So this would be a low-priority issue?

Would a thoroughly worked out patch be accepted?

.

--
http://lazaridis.com