From: tho_mica_l Date: 2008-01-30T23:00:00+09:00 Subject: Re: For Loop question > it's supposed to run until it finds an element of the array that isnt > blank and then stop. And then do what? Do you need the index? In this case you can use the index method. a = [1,2,nil,3] a.index(nil) # => 2 or do you want the elements before that? Or ... Anyway, another solution close in resemblance to yours could be: for e in a break if e.nil? do_something e end HTH, Thomas.