From: Dave Burt Date: 2004-11-22T09:48:05+09:00 Subject: Re: Newbie Question: Escaping special characters in array of strings "Gene Kahn" wrote: > Hello, > > Because of the embedded single quote, this statement does not work. > > %w[it's you're they're] > > Escaping it with the backslash does not work either: > > %w[it\'s you\'re they\'re] What version of Ruby are you using? ruby 1.8.1 (2003-12-25) [i386-mswin32] irb(main):001:0> %w[it's you're they're] => ["it's", "you're", "they're"] irb(main):002:0> %w[it\'s you\'re they\'re] => ["it\\'s", "you\\'re", "they\\'re"]