Issue #9678 has been updated by Rodrigo Rosenfeld Rosas.


Is it possible to start the '>' anywhere besides the first char?

~~~
def my_method
  a = <<Message1:
  Message1:
    > Some
    > content
end

~~~

Or even something anonymous like:

~~~
def my_method
  a = <<:
    > Some
    > content
end
~~~

----------------------------------------
Feature #9678: New heredoc syntax
https://bugs.ruby-lang.org/issues/9678#change-45967

* Author: Alexey Muranov
* Status: Feedback
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
For whatever it is worth, i've just had this idea of a new heredoc syntax for some programming language:

    class C
      def f(x)
        print >>Message1 + >>Message2
    Message1:
    > Literal text
    > ------------
    > Here text.
    >
    Message2:
    >> Text with interpolation and escapes
    >> -----------------------------------
    >> Here text with interpolation: #{ x }.
    >>
      end
    end



-- 
https://bugs.ruby-lang.org/