summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-23 06:12:02 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-23 06:12:02 +0000
commit463633e4a934a00f869086a6ffbf84c6cb8ad630 (patch)
treebba18a5c3ac5ac6cb01933c70ce28137e7112c5b
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://ci.ruby-lang.org/ruby/trunk@35121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--transcode.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fd8b2b7218..a5eaca474e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Mar 23 15:12:12 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * 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]
+
Fri Mar 23 13:19:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* bignum.c (rb_str_to_inum): must be ASCII compatible encoding as
diff --git a/transcode.c b/transcode.c
index 1378402eb7..ac64fdf617 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:
*