Enclose strings in single quotes : String Literal « String « Ruby






Enclose strings in single quotes


puts 'Enclose strings in single quotes'

 








Related examples in the same category

1.Enclose strings in double quotes
2.mix single and double quotes, as long as Ruby can keep them straight
3.you cannot mix double-quoted text inside a double-quoted string, or single-quoted text inside a single-quoted string
4.Alternate single and double quotes
5.Escape quotation marks with a backslash
6.Make the print method skip to the next line without a HERE document, use the newline character, \n.
7.Three-line string literal
8.XML uses paired angle brackets: