From: Hans Mackowiak Date: 2013-03-06T03:38:38+09:00 Subject: Re: How `next` works in ruby with `unless` ? Robert Klemme wrote in post #1100233: > On Tue, Mar 5, 2013 at 7:23 PM, wrote: >>> 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 hm it does: [1,2,3,4].map {|d| next d,4,5;p "is not printed" } #=> [[1, 4, 5], [2, 4, 5], [3, 4, 5], [4, 4, 5]] -- Posted via http://www.ruby-forum.com/.