Multi-Line Comments in Ruby?

后端 未结 10 1689
忘了有多久
忘了有多久 2020-11-30 16:21

How can I comment multiple lines in Ruby?

10条回答
  •  余生分开走
    2020-11-30 16:49

    Using either:

    =begin
    This
    is
    a
    comment
    block
    =end
    

    or

    # This
    # is
    # a
    # comment
    # block
    

    are the only two currently supported by rdoc, which is a good reason to use only these I think.

提交回复
热议问题