This doesn't work:
FOOBAR = 'foobar'
%W{ FOOBAR }
output: ["FOOBAR"]
However, the constant gets interpolated correctly by:
"#{FOOBAR}"
output: "foobar"
This doesn't work:
FOOBAR = 'foobar'
%W{ FOOBAR }
output: ["FOOBAR"]
However, the constant gets interpolated correctly by:
"#{FOOBAR}"
output: "foobar"
You're misusing %W
literal. From book:
%W - Interpolated Array of words, separated by whitespace
so it doesn't have anything to do with interpolation.