On Mon, Oct 3, 2011 at 8:16 AM, Yusuke Endoh <mame / tsg.ne.jp> wrote:

> How about importing String#margin from Facets?
>
> my_string = <<-END.margin
>  |doc
>  |doc
>  |doc
> END
>
> p my_string #=> "doc\ndoc\ndoc"
>
>
> http://rubyworks.github.com/facets/doc/api/core/String.html#method-i-margin

Yes, in fact #margin was born from the idea of %L. The downside of
#margin is that it requires more processing overhead, where as the
literal notation would be very fast (if it is possible to implement in
Ruby parser).