aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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:
*