It bothers me also.  How about this for a solution:

	x.each with {|i| doit}

	x.each with
	{
		|i|
		doit
	}

The "with" keyword could be optional, just like the "then" keyword.

-----Original Message-----
From: mjbjr / beaudesign.com [mailto:mjbjr / beaudesign.com]
Sent: Saturday, October 20, 2001 10:16 AM
To: ruby-talk ML
Subject: [ruby-talk:22839] Re: brace block oddity(?), curiousity


On Sat, Oct 20, 2001 at 08:47:12PM +0900, HarryO wrote:
> In article <001501c15928$5bcfe640$0200a8c0 / austin.rr.com>, "Hal E. Fulton"
> <hal9000 / hypermetrics.com> wrote:
>
> > If you desperately want to start the block on the next line, you could
> > always use the (ugly) backslash trick:
> >
> >     addressbook.each_line  \
> >     {
> >        #...
> >     }
>
> If I were a bit more clever (hmmm ... a lot more clever), I'd try to patch
> the interpreter to handle just this partcular case. I love ruby, but this
> one code layout issue drives me nuts.
>
> I know it's horribly anal retentive to worry about things like where
braces
> go, but it's somewhat of a programmer tradition, isn't it :-) ??

Same here, but more importantly, for me, it's easier to see the matching
braces, even if my editor can show me the matchings.  Plus, the symmetry
appeals to me.

--
                            - Martin J. Brown, Jr. -
                            - mjbjr / beaudesign.com -

 Public PGP Key ID: 0xDB184F7B  Key Server: http://certserver.pgp.com/