Robert Klemme wrote in post #1134107:

>> On the top level we can call `loop` method, but why not the same way
>> inside the method `show` ?
>
> You are not invoking it inside #show, you are invoking it directly.
> And you cannot call it with a receiver because it is defined private
> in Kernel:

> Kind regards
>
> robert

I know `#loop` is a private method. And private method can't have an 
explicit receiver. But you can see in my `#show` method, there is no 
explicit call. Why then error ?

Yes. I know Fixnum has `#times` method. But `Kernel#loop` gives us 
Enumerator, without block. I am trying to understand what is the actual 
applicable area for that design(without block).

Why do we need `Kernel#loop` without block version ?

Thanks

-- 
Posted via http://www.ruby-forum.com/.