From: Ilias Lazaridis Date: 2011-06-10T00:26:37+09:00 Subject: Re: CORE - Altering Behaviour of "each do" (default param "item") On 4 Ιούν, 14:47, Ilias Lazaridis wrote: > 1.9 > > names = ["Jane", "Michele", "Isabella"] > > # current behaviour > names.each do |name| >   print name > end > > #Question: How can I alter the behaviour of "each" in the following > way: > names.each do >   print item         # "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