On 4 =C9=EF=FD=ED, 14:47, Ilias Lazaridis <il... / lazaridis.com> wrote:
> 1.9
>
> names =3D ["Jane", "Michele", "Isabella"]
>
> # current behaviour
> names.each do |name|
> =A0 print name
> end
>
> #Question: How can I alter the behaviour of "each" in the following
> way:
> names.each do
> =A0 print item =A0 =A0 =A0 =A0 # "item" is used by default
> end
>
> Is this possible, without going to C-level?

related issue

Provide Default Variables for Array#each and other iterators
http://redmine.ruby-lang.org/issues/4830

.

--
http://lazaridis.com