On May 21, 10:35 am, Robert Klemme <shortcut... / googlemail.com> wrote:

> > An alternative is to use a functor (a function delegator) for your
> > parameters, eg.
>
> >   f = Foo.new
> >   f.range(1,5).each{|x| p x}
>
> ... which is basically the same as using to_enum - only less portable;
> to_enum works with *all* methods. :-)

That true. But at least it reads much better.

T.