Because changing the syntax of the code using double or single quotes changes the result that is printed?
<puts"hola \n nueva "
puts'hola \n nueva '>
Because changing the syntax of the code using double or single quotes changes the result that is printed?
<puts"hola \n nueva "
puts'hola \n nueva '>
In ruby there is a distinction between double and single quotes. If you use double quotes, the content is evaluated and the interpolated code is executed between # {}, if any.
Likewise, escape sequences like \ n will not work, for example. That is why you are shown different results.
Greetings
In the programming languages the single quote makes a direct cast to string does not validate special characters or variables. While with the double quotes the content of the string is evaluated in search of varibles or special characters.