Space in the ruby array by %w

How can I add space character in the ruby array if I want to use %w(a b c) syntax?


Escape it:

%w(a b\ c) # => ["a", "b c"]

Try this:

>> a = %w(a\  b c)
=> ["a ", "b", "c"]