Hi,

At Sun, 2 May 2010 19:20:41 +0900,
Benoit Daloze wrote in [ruby-core:29931]:
> Is is possible, then, to keep the result of the last expression in the
> loop, before it fails?

Possible.
http://github.com/nobu/ruby/commit/b83915dda5645d57f83947bc948abe76fcae59e0

> def method
>   array = []
>   while <condition>
>     array << do_sth
>     # With loop & break, here would be: break array unless <condition>
>   end
>   array # I would like to remove this "superfluous" statement
> end
> 
> This would be a nice feature, and would remove the need to explicitly
> mention the return value, again after the loop.

It feels too confusing to me.

-- 
Nobu Nakada