def it
  @it = block_given? ? yield : @it
end

p it if it{ 'bar' }

On 5/25/07, Nobuyoshi Nakada <nobu / ruby-lang.org> wrote:
> Hi,
>
> At Fri, 25 May 2007 12:55:09 +0900,
> Greg Fodor wrote in [ruby-talk:252899]:
> > But this would be cool:
> >
> > my_strings.map { pluralize it }.filter { it =~ /tests/ }.each { p it }
>
> p *my_strings.map(:pluralize).grep(/tests/)
>
> --
> Nobu Nakada
>
>