tags:

views:

62

answers:

1

I'm aware of the Ruby word array:

a = %w( stackoverflow serverfault superuser)

How can I use the above to display a list where each item can have 2 or more words, for instance:

a = ['stack overflow', 'server fault', 'super user']
+4  A: 

a = %w( stack\ overflow server\ fault super\ user)

hiena
Right, I didn't know you could do escaping in Ruby. I think I'll go with the more verbose way with the quotes.
Thierry Lam