From: nobu.nokada@... Date: 2003-08-14T15:21:10+09:00 Subject: Re: p format - ruby bug? - dumb program? Hi, At Wed, 13 Aug 2003 03:10:11 +0900, KONTRA Gergely wrote: > Can I specify how strings are printed, when using the p function? > I mean with ' or with " ? It is hard coded in String#inspect method, so you have to override it. class String alias __inspect_orig__ inspect def inspect s = __inspect_orig__() s.sub!(/'/, "\\\\'") s.sub!(/\\"/, '"') s.gsub!(/(\A"|"\z)/, "'") end end -- Nobu Nakada