I recently realized that if you juxtapose a sequence of Ruby string literals (e.g. \'a\' \"b\" \'c\'
), it\'s equivalent to the concatenation of those string lit
There is a reference in The Ruby Programming Language, page 47.
It looks like it is deliberately in the parser, for situations where you want to split up string literals in code, but don't want to pay the price of concatenating them (and creating 3 or more strings). Long strings with no line breaks, and without requiring line-length busting code, are a good example
text = "This is a long example message without line breaks. " \
"If it were not for this handy syntax, " \
"I would need to concatenate many strings, " \
"or find some other work-around"