From: Alan Chen Date: 2001-11-14T07:10:26+09:00 Subject: [ruby-talk:25088] Re: exiting blox On Wed, Nov 14, 2001 at 06:51:41AM +0900, Niko Schwarz wrote: > Hi there, > is there a way to exit a block before time? > like: > > field.each { |el| > if(el.alsacian?) > break #no, dont want anymore > else > puts el > end > } > > is there? (note: i want to exit it just for one el, of course) > > tia, > > nick I'd like to know this one also. I find that I keep trying to write "return" or "break" in these cases. (And it works as badly the first time as the subsequent times :) -- Alan Chen Digikata LLC alan@digikata.com http://digikata.com