From: Tim Hunter Date: 2007-09-25T02:32:08+09:00 Subject: Re: literal quote in an array? Simon Schuster wrote: > using colons for now, but would like to somehow encapsulate a sentence > in this way (basically), with quotes. > > speaker = ["joe ", "betty "] > expression = ["said: ", "replied: ", "stated: "] > content = ["hello.", "bye."] > > 053:0> sentence = speaker[0] + expression[1] + content[0] > "joe replied: hello." > but I'd like to get: > "joe replied, "hello."" > > thanks! '"hello"' %q{"hello"} "\"hello\"" -- Posted via http://www.ruby-forum.com/.