diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-22 12:43:57 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-22 12:43:57 +0000 |
commit | bdbc8a8f1214b601ca409f66f2fe00ac06f2e99a (patch) | |
tree | 803e191b4a2e7658d4ad980e9cb2045926f5901f /string.c | |
parent | 4e64c54728d0d1db94f229feb59fd1bf2d60f686 (diff) |
Add more example of `String#dump`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6002,12 +6002,13 @@ rb_str_inspect(VALUE str) * str.dump -> new_str * * Produces a quoted version of +str+ with all non-printing characters replaced - * by <code>\xnn</code> notation and all special characters escaped. + * by <code>\xHH</code> notation and all special characters escaped. * * This method can be used for round-trip: if the resulting +new_str+ is * eval'ed, it will produce the original string. * - * "hello \n ''".dump #=> "\"hello \\n ''\"" + * "hello \n ''".dump #=> "\"hello \\n ''\"" + * "\f\x00\xff\\\"".dump #=> "\"\\f\\x00\\xFF\\\\\\\"\"" */ VALUE |