ruby 1.8 space before argument parenthesis

D

Dave Baldwin

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.
 
Y

Yukihiro Matsumoto

Hi,

In message "ruby 1.8 space before argument parenthesis"

|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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,137
Messages
2,570,797
Members
47,342
Latest member
eixataze

Latest Threads

Top