From: Sean Russell Date: 2002-07-09T23:06:50+09:00 Subject: Re: for ... else ... end Yukihiro Matsumoto wrote: > But I don't feel "for .. else" is intuitive. The "else" seem like > indentation mistake rather than loop termination hook. Maybe there > can be a more suitable keyword. Here are the suggestions, so far: else ensure finally I agree Jonas: it would be nice to have 'else' mean 'if the loop was never entered'; EG: for x in some_array # ... break if x == foo else puts "The array was empty" finally # or ensure, which is already a Ruby keyword puts "x was foo!" end I don't know when I'd ever use 'finally', but I can think of many cases where the 'else' would have saved me some time. --- SER