I have a small Ruby script where an array is initialized to hold a few strings
MyArray = ["string 1", "string 2" , "string 2" ]
The problem is that I have quite a few strings in the initialization list and I would like to break the line:
MyArray = [
"string 1"
,"string 2"
,"string 2"
]
but Ruby flags a syntax error for this format I tried adding "\" to the end of each line without any success.
How can this be accomplished in Ruby?