Professional Web Applications Themes

ruby 1.8 space before argument parenthesis - Ruby

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

  1. #1

    Default ruby 1.8 space before argument parenthesis

    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.



    Dave Baldwin Guest

  2. #2

    Default Re: ruby 1.8 space before argument parenthesis

    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.

    Yukihiro Matsumoto Guest

Similar Threads

  1. #39550 [NEW]: unlink() does not work if filename contains parenthesis.
    By andy at advancethermal dot com in forum PHP Bugs
    Replies: 2
    Last Post: November 20th, 03:43 PM
  2. Font size is off (why in parenthesis?)
    By kbuicker@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 3
    Last Post: September 28th, 08:14 PM
  3. Parenthesis in column name
    By Pythonic in forum Coldfusion Database Access
    Replies: 4
    Last Post: June 4th, 12:51 PM
  4. Regular expressions and parenthesis in match text
    By Carl Cunningham in forum PERL Miscellaneous
    Replies: 2
    Last Post: September 15th, 11:02 AM
  5. nested parenthesis in regex and launching a new process
    By Bryan Harris in forum PERL Beginners
    Replies: 6
    Last Post: September 3rd, 02:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139