# Can use " or ' for Strings, but ' is more efficient
puts 'Hello World'
# String concatenation
puts 'I like' + ' Ruby'
# Escape sequence
puts 'It\'s my Ruby'
# New here, displays the string three times
puts 'Hello' * 3
# Defining a constant
PI = 3.1416
puts PI
#The command output string is sent to the operating system as a command to be executed (under windows operating system, we have sent the dir command),
whereupon the output of the command (dir on a command window would display all the files and sub directories in your folder) is then displayed by
puts.
check out this page:
http://ruby.about.com/od/learnruby/qt/strings.htm
Truth be told, the quotes don't really matter if your doing simple stuff like this but later on its got to do with escape characters and string interpolation. The quotes themselves only have one main difference that is memory allocation, from what I understand the double quotes allocate more of it then the single quotes.
in PHP, the single-quote is treated as plain-text, whereas the double-quote is actually parsed. I'm not sure if this is the same for Ruby. how is the single-quote more efficient?