Ruby handles strings like numbers. We enclose them in single quotes (' ... ') or double quotes ("...").
Ruby> "abc"
"abc"
ruby> ' abc '
"abc"
Single and double quotes have different effects in some cases. A string enclosed in double quotes allows characters to be drawn by a forward slash, and can be inline with #{} expressions.
Strings that are enclosed in single quotes do not interpret strings; What you see is what it is. Several examples:
ruby> print "a\nb\nc","\n"
a
c
nil
ruby> print 'a\nb\n',"\n"
a\nb\nc
nil
ruby> "\n"
"\n"
ruby> '\n'
"\\n"
ruby> "\001"
"\001"
ruby> '\001'
"\\001"
ruby> "abcd #{5*3} efg"
"abcd 15 efg"
ruby> var = " abc "
" abc "
ruby> "1234#{var}5678"
"1234 abc 5678"
Ruby's string manipulation is more dexterous and intuitive than C. For example, you can concatenate a few with + and repeat a string several times:
Ruby> "foo" + "Bar"
"Foobar"
ruby> "foo" * 2
"Foofoo"