multi line comments in ruby

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default multi line comments in ruby

    Hi,

    some time (years ;-) ago there was a discussion about multi line comments
    in ruby on this list. I didn't follow it completely, just found it in
    news.google. There were sth. about 60 postings but AFAIK today (and it is
    2 years later!) there is still no other way to make multi line comments
    in ruby then the cumbersome

    =begin
    ....
    =end

    block? Is this right, or have I simply missed something?

    IMHO a simple c/c++ style comment

    /*
    ....
    */

    is missing in ruby!


    Artur

    __________________________________________________ _____________________________
    Artur Merke
    ||| [email]artur.merke@udo.edu[/email]
    (O-O)
    _____________________________________________.oo0--(_)--0oo.___________________

    Artur Merke Guest

  2. Similar Questions and Discussions

    1. multi line title in xml
      I've just completed the tutorial on "Creating a Dynamic Playlist for Progressive Flash Video"...
    2. Multi-line datagrid
      I'd like to have most of my fields on one row of the datagrid, like it is by default, but put one of the fields (a long description field) on a...
    3. Multi-line keys in SQL?
      I've been using FM for many years now, and have made extensive use of multi-line keys (multiple values in a text field, separated by returns, for...
    4. Auto size multi-line
      Having an issue... When displaying text in a multi-line text box in layout view, it gets cut-off if the text is larger than the size of the box....
    5. Multi-line text
      If I have a text layer with multiple lines, the spacing between them is extreme. Is there any to decrease the spacing in Elements v.2? Thanks,...
  3. #2

    Default Re: multi line comments in ruby


    "Artur Merke" <merke@ls1.cs.uni-dortmund.de> schrieb im Newsbeitrag
    news:Pine.LNX.4.33.0311100952070.17966-100000@as0203.cs.uni-dortmund.de...
    > Hi,
    >
    > some time (years ;-) ago there was a discussion about multi line
    comments
    > in ruby on this list. I didn't follow it completely, just found it in
    > news.google. There were sth. about 60 postings but AFAIK today (and it
    is
    > 2 years later!) there is still no other way to make multi line comments
    > in ruby then the cumbersome
    >
    > =begin
    > ...
    > =end
    >
    > block? Is this right, or have I simply missed something?
    >
    > IMHO a simple c/c++ style comment
    >
    > /*
    > ...
    > */
    >
    > is missing in ruby!
    Personally I don't miss it since I don't find =begin =end tedious. As far
    as I remember there was some problem with the language syntax that
    prevented usage of /* */. And, after all: Ruby != C... :-)

    Regards

    robert

    Robert Klemme Guest

  4. #3

    Default Re: multi line comments in ruby

    * Artur Merke; Mon, 10 Nov 2003 10:28:17 +0100
    > some time (years ;-) ago there was a discussion about multi line comments
    > in ruby on this list. I didn't follow it completely, just found it in
    > news.google. There were sth. about 60 postings but AFAIK today (and it is
    > 2 years later!) there is still no other way to make multi line comments
    > in ruby then the cumbersome
    >
    >=begin
    > ...
    >=end
    Here's an evil hack that you should *not* use:

    _=<<_
    This
    is
    a
    multiline
    pseudo-comment
    _


    Josef 'Jupp' Schugt
    Josef 'Jupp' Schugt Guest

  5. #4

    Default Re: multi line comments in ruby


    "Josef 'Jupp' Schugt" <jupp@gmx.de> schrieb im Newsbeitrag
    news:bop7am$1hbu6a$1@ID-53633.news.uni-berlin.de...
    > * Artur Merke; Mon, 10 Nov 2003 10:28:17 +0100
    >
    > > some time (years ;-) ago there was a discussion about multi line
    comments
    > > in ruby on this list. I didn't follow it completely, just found it in
    > > news.google. There were sth. about 60 postings but AFAIK today (and
    it is
    > > 2 years later!) there is still no other way to make multi line
    comments
    > > in ruby then the cumbersome
    > >
    > >=begin
    > > ...
    > >=end
    >
    > Here's an evil hack that you should *not* use:
    I'm wondering why you present it. Isn't that contradictory?
    :-)

    robert

    Robert Klemme Guest

  6. #5

    Default Re: multi line comments in ruby

    Hi!

    * Robert Klemme; 2003-11-17, 14:18 UTC:
    > "Josef 'Jupp' Schugt" <jupp@gmx.de> schrieb im Newsbeitrag
    > news:bop7am$1hbu6a$1@ID-53633.news.uni-berlin.de...
    > > Here's an evil hack that you should *not* use:
    >
    > I'm wondering why you present it.
    Because it exists.
    > Isn't that contradictory?
    No, I say one should not use it as in 'refrain from using it unless
    you precisely know what you are doing' (the RFC SHOULD that is :-).

    Josef 'Jupp' Schugt
    --
    .-------.
    message > 100 kB? / | |
    sender = spammer? / | R.I.P.|
    text = spam? / ___| |___


    Josef 'Jupp' SCHUGT Guest

Posting Permissions

  • You may not post new threads
  • You may 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