From: Dan Debertin Date: 2002-08-29T07:13:40+09:00 Subject: Re: next statement At Thu, 29 Aug 2002 07:07:48 +0900, David Douthitt wrote: > > However, when I tried this I got: > > mycode:###: parse error > next 2 if true > ^ Of course you did -- were you expecting ruby to automagically figure out what '2' refers to? ;) 'next' just exits the innermost enclosing loop. To break out of multiple loops, you want catch/throw, used like this: catch(:done) { list.each { |entry| list2.each { |entry2| throw :done if true } } } Dan -- /^Dan Debertin$/ airboss@nodewarrior.org | Did I sleep a little too late, www.nodewarrior.org | or am I awake? --Byrne