11:15:14lasto1.9.3 ~/clients 🐤 irb
1.9.3-p448 :001 > s = "this\n\tis \"helpful\""
=> "this\n\tis \"helpful\""
1.9.3-p448 :002 > puts s
this
is "helpful"
=> nil
1.9.3-p448 :003 >
Displaying a string unescaped in IRB or in general
-
03-08-2022 - |
Question
Suppose I have a string "this\n\tis \"helpful\""
and I'd like it to be displayed in the terminal, unescaped, for copy/paste reasons, i.e.
this
is "helpful"
Is this possible in terminal, either in IRB or otherwise?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow