From: John Feminella Date: 2011-02-14T09:48:09+09:00 Subject: Re: What does %q do? %q{abc} is equivalent to writing "abc". It's most useful when you have a string literal that contains a lot of characters you'd need to escape. Compare: "Gaba Luschi asked the ruby-talk list, \"What does %q do?\"" vs. %q{Gaba Luschi asked the ruby-talk list, "What does %q do?"} And note they're equal: > a = %q{Gaba Luschi asked the ruby-talk list, "What does %q do?"} > b = "Gaba Luschi asked the ruby-talk list, \"What does %q do?\"" > a == b => true ~ jf -- John Feminella Principal Consultant, BitsBuilder LI: http://www.linkedin.com/in/johnxf SO: http://stackoverflow.com/users/75170/ On Sun, Feb 13, 2011 at 19:39, Gaba Luschi wrote: > What does %q do in ruby? > > -- > Posted via http://www.ruby-forum.com/. > >