Actions
Bug #11116
closedThe spec of String#dump
Description
The current spec says:
call-seq:
str.dump -> new_str
Produces a version of +str+ with all non-printing characters replaced by
<code>\nnn</code> notation and all special characters escaped.
"hello \n ''".dump #=> "\"hello \\n ''\"
\nnn
must be \xnn
now.
In addition, I've expected String#dump to return a string that evaluates to an original string (except singleton methods, object id, etc.) when eval
ed. Is this a right expectation? If so, it would be good to officially include the mention in the spec. What do you think?
--
Yusuke Endoh mame@ruby-lang.org
Actions
Like0
Like0Like0Like0