path: root/transcode.c
diff options
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-23 06:12:02 (GMT)
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-23 06:12:02 (GMT)
commit463633e4a934a00f869086a6ffbf84c6cb8ad630 (patch)
treebba18a5c3ac5ac6cb01933c70ce28137e7112c5b /transcode.c
parent163ab0a4da61699c84bba46cd9d7bdd6c67ba1e5 (diff)
transcode.c (documentation for str_encode): Explain
that transcoding to the same encoding is a no-op (i.e. no exceptions, no replacements,...). [ruby-core:43557][Bug #6190] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/transcode.c b/transcode.c
index 1378402..ac64fdf 100644
--- a/transcode.c
+++ b/transcode.c
@@ -2815,6 +2815,10 @@ static VALUE encoded_dup(VALUE newstr, VALUE str, int encidx);
* in the source encoding. The last form by default does not raise
* exceptions but uses replacement strings.
+ * Please note that conversion from an encoding +enc+ to the
+ * same encoding +enc+ is a no-op, i.e. the receiver is returned without
+ * any changes, and no exceptions are raised, even if there are invalid bytes.
+ *
* The +options+ Hash gives details for conversion and can have the following
* keys: