From: MikkelFJ Date: 2001-12-29T12:16:09+09:00 Subject: [ruby-talk:29614] textsubstitution and quotes Version: Ruby 1.65 (haven't tried 1.66 yet) the following does not create a list "a" "b" "c" as expected when creating s, but s1 works: a = ['a','b','c'] s="\"#{a.join('" "')}\"" spc='" "' s1="\"#{a.join(spc)}\"" irb transcript: irb(main):001:0> a = ['a','b','c'] ["a", "b", "c"] irb(main):002:0> s="\"#{a.join('" "')}\"" "\"#a.join('')}\"" irb(main):003:0> spc='" "' "\" \"" irb(main):004:0> s1="\"#{a.join(spc)}\"" "\"a\" \"b\" \"c\"" irb(main):005:0> I seems like the scanner in Ruby 1.65 does not properly handle textsubstitutions when dealing with double quotes. MikkelFJ