GáÃor SEBESTY¥ÎN wrote:
> Hi,
> 
>
[..]
> boolean b = true;
> Iterator it = objs.iterator();
> while (b && it.hasMore()) {
>     Object anObj = it.next();
>     ...
> }
> 
> What is the equivalent to this in Ruby?

You can abuse Enumerable#find for this:

objs.find do |obj|
	# do something with obj

	!b	# return true to stop
end

I don't know wether is very rubyish ;)

> Thanks,
> 
>     GáÃor

Sebastian