[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby 1.8 space before argument parenthesis

Dave Baldwin

10/14/2003 3:03:00 PM

Hi,

I have just moved over to using 1.8 and on a previously working script
I now get

@field = getField (line)
warning: don't put space before argument parentheses

but later on
out << "some string".gsub (/[\s\n]*$/, "")
^
(under the first /)
syntax error (SyntaxError)

Removing the space gets rid of the syntax error or changing the <<
operator to a += give a warning.

I personally like to have the space before an argument parenthesis, but
it seems odd that in one place it deserves a warning and in others it
gets an error.

Dave.



1 Answer

matz

10/14/2003 3:19:00 PM

0

Hi,

In message "ruby 1.8 space before argument parenthesis"
on 03/10/15, Dave Baldwin <dave.baldwin@3dlabs.com> writes:

|I personally like to have the space before an argument parenthesis, but
|it seems odd that in one place it deserves a warning and in others it
|gets an error.

It's caused by limitation of yacc parser generator (and my brain).
Please stand, and don't put spaces before argument parentheses, please.

matz.