解决方法
大写时,数组由内插的字符串构成,如双引号字符串所示;当下划线时,它是由未内插的字符串构成的,如在单引号字符串中将发生的那样.例如:
irb(main):001:0> foo = "bar" => "bar" irb(main):002:0> %w(#{foo} bar baz) => ["\#{foo}","bar","baz"] irb(main):003:0> %W(#{foo} bar baz) => ["bar","baz"] irb(main):004:0> ^D