From: Bob Smith Date: 2010-07-29T03:48:34+09:00 Subject: Re: Problem in loop do Amir Ebrahimifard wrote: > I wrote a small program , and I test for myself but the result for > "next" and "redo" was same. > now please help me . I've not been visiting here for very long, but I suspect people will be quicker/more inclined to help if you provide the program you've created to test the issue/question. Play with the following code -- run it and see what it does... uncomment the "next if i < 3" line, run it, and see what it does... recomment the "next" line, uncomment the "redo" line, run it, and see what it does. for i in 1..5 puts 'current value of i is: ' + i.to_s #next if i < 3; #redo if i < 3; puts 'end of loop and i is: ' + i.to_s end Additionally, a quick Google search of "ruby redo next" will turn up this link: http://www.tutorialspoint.com/ruby/ruby_loops.htm -- Posted via http://www.ruby-forum.com/.