From: Stefan Schmiedl Date: 2001-11-14T06:58:32+09:00 Subject: [ruby-talk:25085] Re: exiting blox you could try throw and catch as in catch(:alsacian) { field.each { |el| throw(:alsacian) if el.alsacian? puts el } } s. Niko Schwarz (2001-11-14 06:51): > 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 > -- > A lot of people I know believe in positive thinking, and so do I. I > believe everything positively stinks. > -- Lew Col -- Stefan Schmiedl EDV-Beratung, Programmierung, Schulung Loreleystr. 5, 94315 Straubing, Germany Tel. (0 94 21) 74 01 06 Public Key: http://xss.de/stefan.public shhhh ... I can't hear my code!