summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorMarcus Stollsteimer <sto.mar@web.de>2019-05-05 09:51:40 +0200
committerMarcus Stollsteimer <sto.mar@web.de>2019-05-05 09:51:40 +0200
commit35ff4ed47fcdc14bbdd19540622cb04f86536c95 (patch)
tree52b58d23763f6ede151832c09759804aa10a4d8a /string.c
parentbb4ac7a6506971dc34b5656f1a69aadc7299fcab (diff)
Improve documentation for String#{dump,undump}
Diffstat (limited to 'string.c')
-rw-r--r--string.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/string.c b/string.c
index c8e408d173..d3905cc99d 100644
--- a/string.c
+++ b/string.c
@@ -6007,14 +6007,16 @@ rb_str_inspect(VALUE str)
* call-seq:
* str.dump -> new_str
*
- * Produces a quoted version of +str+ with all non-printing characters replaced
- * by <code>\xHH</code> notation and all special characters escaped.
+ * Returns a quoted version of the string with all non-printing characters
+ * replaced 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 ''\""
* "\f\x00\xff\\\"".dump #=> "\"\\f\\x00\\xFF\\\\\\\"\""
+ *
+ * See also String#undump.
*/
VALUE
@@ -6303,8 +6305,8 @@ static VALUE rb_str_is_ascii_only_p(VALUE str);
* call-seq:
* str.undump -> new_str
*
- * Produces unescaped version of +str+.
- * See also String#dump because String#undump does inverse of String#dump.
+ * Returns an unescaped version of the string.
+ * This does the inverse of String#dump.
*
* "\"hello \\n ''\"".undump #=> "hello \n ''"
*/