src code
String#inspect([useDoubleQuotes = false]) → String
Returns a debug-oriented version of the string (i.e. wrapped in single or double quotes, with backslashes and quotes escaped).