From: "Gábor SEBESTYÉN" Date: 2005-06-20T19:52:30+09:00 Subject: Iterate with condition Hi, I need but actually don't find how to iterate an iterable collection in Java-way. It seems generally like this: Iterator it = objs.iterator(); while (it.hasMore()) { Object anObj = it.next(); ... } How can I do it in Ruby? I know objs.each do |anObj| ... end but it's not (enough) good for me. I want to use additional cycle condition like this: boolean b = true; Iterator it = objs.iterator(); while (b && it.hasMore()) { Object anObj = it.next(); ... } What is the equivalent to this in Ruby? Thanks, G�bor