Apart from this being rather unreadable in my opinion, there has not been a=
 single proposal that doesn't seem extremely ridiculous to me. I mean, "eee=
eend", "e5nd", "fuuu", really? "endmodule" seems to be the least ridiculous=
, but is that really an advantage over "end end end"? Also, it won't help i=
n many cases, since the module nesting will usually only be one or two leve=
ls, and you will only skip one or to ends, I mean "enddo" will only close t=
he last do...

Konstantin

On Jul 19, 2011, at 21:13 , David Aaron Fendley wrote:

>=20
> Issue #5054 has been updated by David Aaron Fendley.
>=20
>=20
> I think the phrase "fold up" is more descriptive of what this is attempti=
ng to do. Thus I propose:
>=20
>=20
> module MyModule
>  class MyClass
>    def my_method
>      10.times do
>        if rand < 0.5=20
>          p :small
> fuuuuu
> ----------------------------------------
> Feature #5054: Compress a sequence of ends
> http://redmine.ruby-lang.org/issues/5054
>=20
> Author: ANDO Yasushi ANDO
> Status: Open
> Priority: Normal
> Assignee:=20
> Category:=20
> Target version:=20
>=20
>=20
> Though as matz said at rubykaigi2011 ruby is a quite good language, many =
people hate a long sequence of `end' like this:
>=20
> module MyModule
>  class MyClass
>    def my_method
>      10.times do
>        if rand < 0.5=20
>          p :small
>        end=20
>      end=20
>    end=20
>  end=20
> end
>=20
> So, I'd like to propose introducing a special keyword, en(n+)d. Using thi=
s keyword, we can rewrite the above example like this:
>=20
> module MyModule
>  class MyClass
>    def my_method
>      10.times do
>        if rand < 0.5=20
>          p :small
>        ennnnnd=20
>=20
> I know matz's already rejected a python-style block. He wrote:
>=20
>> it works badly with
>>  * tab/space mixture
>>  * templates, e.g. eRuby
>>  * expression with code chunk, e.g lambdas and blocks
> http://www.ruby-forum.com/topic/108457
>=20
> These bad things won't occur by introducing en(n+)d.
>=20
> Some implementations already exists.
>=20
> JRuby
> - https://gist.github.com/1088363
>=20
> CRuby
> - http://www.atdot.net/sp/raw/kn9iol
> - http://d.hatena.ne.jp/ku-ma-me/20110718/p1
>=20
> Thanks for your consideration.
>=20
>=20
> --=20
> http://redmine.ruby-lang.org
>=20