1.%w(foo bar)or %w[foo bar]
is a shortcut for ["foo", "bar"].
Meaning it's a notation to write an array of strings separated by spaces instead of commas and without quotes around them.
You can test by:
print %w(foo bar baz)
print %w[foo bar baz]
print ["foo", "bar", "baz"]
待续。。。