From: Eyal Oren Date: 2007-02-21T19:10:05+09:00 Subject: Re: interpolation of escaped characters in strings On Feb 20, 6:23 pm, Xavier Noria wrote: > Looks like you want something close to String#inspect. > puts "foo\tbar\n".inspect # -> "foo\tbar\n" no, that doesn't work. what I would like is that puts would actually print a tab and a newline, instead of \t and \n. E.g. a = 'test\nbreak'. Then "puts a.inspect" doesn't actually print a line break, it prints the characters '\n'. I would like to transform "a" into a string that really includes a linebreak instead of the characters '\n'. Does anybody know how to do it, without eval or a manually crafted gsub?