I wonder how can I preserve consecutive newline characters with Ruby here-document? In my program all of them are collapsed to one newline. For example:
s=<<END
1
2
3
4
END
evaluates to:
s="1\n2\n3\n4\n"
However I would like to preserve the consecutive newlines when for example formatting a BBcode document a letter or something similar.