From: Chris Kottom Date: 2009-02-14T15:07:36+09:00 Subject: Re: while vs loop --001636c5ac8c7db8950462daca13 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Loop will continue indefinitely until it meets with some break statement somewhere in its loop body. While can also be terminated with a break statement, but more traditionally, it ends when the condition specified in the while statement is satisfied. If you have "while 1" as you've written here though, the two should be functionally equivalent. On Sat, Feb 14, 2009 at 7:03 AM, Vetrivel Vetrivel wrote: > what is the Difference between loop and while in ruby ? > > loop do > end > > while 1 > end > -- > Posted via http://www.ruby-forum.com/. > > --001636c5ac8c7db8950462daca13--