Ask a Question related to Ruby, Design and Development.
- Dave Baldwin #1
ruby 1.8 space before argument parenthesis
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 Baldwin Guest
- From: andy at advancethermal dot com Operating system: Windows XP Pro & 2003 Server PHP version: 5.2.0 PHP Bug Type: ...
- Okay, why does the size of one font in InDesign look like this? 11 pt(7.08) What's the deal here?
- I have a parenthesis in a column name, e.g. Discount(%). Unfortunately, I'm not in a position to rename the column. When I try to display the value...
- Hi folks, I'm going bonkers with what should be a simple problem. I'm trying to change this text (don't worry about <ul> & </ul>, I've got that...
- Two quick questions for the gurus: 1. How are nested parenthesis in a match m// backreferenced? I have a folder full of files: file_3.0...
- Yukihiro Matsumoto #2
Re: ruby 1.8 space before argument parenthesis
In message "ruby 1.8 space before argument parenthesis"
on 03/10/15, Dave Baldwin <email@example.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.
Yukihiro Matsumoto Guest