If you want o to break a long single-cycling string literal on multiple lines without inserting a new line into it.
Just splitting it into several adjacent string literals, the ruby interpreter will concatenate them during the parsing process.
str = "hello" "all" puts str
remember that you must avoid newlines between literals so that ruby does not interpret the newline as a terminator for the statement.
str = "hello" \ " all" \ " how are you." puts str
Deep Gupta Jan 08 '15 at 7:00 2015-01-08 07:00
source share