src code

instance method String#inspect

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).