From: John W Higgins Date: 2009-12-03T11:16:36+09:00 Subject: Re: Increment outerloop value in innerloop in each do Syntax --001636d33959875db30479c994c7 Content-Type: text/plain; charset=ISO-8859-1 Good Day Nag, On Wed, Dec 2, 2009 at 5:29 PM, Nag Raj wrote: > I have to get it done with each do syntax. Because I have a structure > type tag in xml file and I need to move onto next element if my > comparision goes fine. > > If you would like assistance please don't try to outsmart us. If you have a specific issue (and apparantly this double loop is not your issue) please just discuss the issue and not try to make it pretty or such. Ruby isn't like C in many respects to looping and you probably are not approaching your actual problem in a very "Rubyesque" method by doing it a C style loop. Specifcally unless you need the element index for some reason - you will find many Ruby idioms never use an index based loop but rather an "object" based loop instead iterating over the actual objects you are intersted in. Again, absent what you are specifically trying to accomplish - it's difficult to assist. John --001636d33959875db30479c994c7--