From: Sean Chittenden Date: 2002-07-09T18:34:50+09:00 Subject: Re: for ... else ... end > > for elt in arr > > puts elt > > else > > puts "no rows" > > ensure > > puts "done looping" > > end > > Ahm, this seems a slightly different problem. > Here the else marks the case that the loop > _never_ has been entered, not interrupted by 'break'. > > And what do you suggest with 'ensure' ("done looping") > here? ensure should catch break... break strikes me as being identical to an exception that's caught at the end of the loop. Truthfully though, I was more excited about catching the case when a loop wasn't entered (ex: 0 rows from the DB), vs when a break is thrown. If you want an "else", then use a normal exception block... though it is nice sugar to have in the language I suppose (albeit slightly confusing to the uninformed). <:~) -sc -- Sean Chittenden