I am trying to output two values in an array with new line.
list = []
list << "hello"
list << "\n";
list << "testing"
puts "#{list}"
This will give hello
, \n
, testing
instead of the following output:
hello
testing
How can I output this array with a newline?