From: Josh Cheek Date: 2011-04-17T03:36:05+09:00 Subject: Re: For loops trouble --0016e68def6c47b0b504a10d6ec9 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Apr 16, 2011 at 1:27 PM, Daniel Johnson wrote: > I am trying to translate a program I have in Java into ruby and having > trouble translating this for loop > for(int i = 0; a[i] < x;i++) > I tried this > for i in a[i]...x > but it produce some errors. Any help will be appreciated. Thank you. > > -- > Posted via http://www.ruby-forum.com/. > > numbers = *1..10 max = 6 numbers.each do |num| break unless num < max puts num end --0016e68def6c47b0b504a10d6ec9--