On Tue, Mar 5, 2013 at 7:23 PM,  <[email protected]> wrote:
> Am 05.03.2013 19:18, schrieb Kumar R.:
>
>> Kumar R. wrote in post #1100105:
>
>
>>> line : "next puts "hi" unless n == 5 " .
>>
>>
>> next generally used to skip the part of execution and send the control
>> to the beginning. But how the in between part puts "hi" has been
>> executed. Why does next not skip this statement ?

Probably because arguments are always evaluated before the "method"
they are handed over to.

> Nobody writes code like this, so why care.

I wasn't even aware that next accepts an argument - funnily it won't
accept two (syntax error).

Cheers

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- 
[email protected] | 
https://groups.google.com/d/forum/ruby-talk-google?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ruby-talk-google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to