summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-21 08:51:51 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-21 08:51:51 +0000
commit6891a1cd5ddd9e5e07d537060a257abaa6833648 (patch)
tree1c6d8b71264e874dcb34bbe7a060bd5a2c397432 /string.c
parent8a294e0f20b0bf4df6528944aa4a4d5ea76b88de (diff)
string.c (rb_str_dump): Fix the rdoc
* Officially states that String#dump is intended for round-trip. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/string.c b/string.c
index ccf4796d3b..3741d449f4 100644
--- a/string.c
+++ b/string.c
@@ -6002,7 +6002,10 @@ rb_str_inspect(VALUE str)
* 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.
+ * <code>\xnn</code> notation and all special characters escaped.
+ *
+ * This API is intended for round-trip: if the result string is eval'ed,
+ * it produces the original string.
*
* "hello \n ''".dump #=> "\"hello \\n ''\""
*/