ruby-changes:23071
From: duerst <ko1@a...>
Date: Fri, 23 Mar 2012 15:12:15 +0900 (JST)
Subject: [ruby-changes:23071] duerst:r35121 (trunk): transcode.c (documentation for str_encode): Explain
duerst 2012-03-23 15:12:02 +0900 (Fri, 23 Mar 2012) New Revision: 35121 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35121 Log: 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] Modified files: trunk/ChangeLog trunk/transcode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35120) +++ ChangeLog (revision 35121) @@ -1,3 +1,10 @@ +Fri Mar 23 15:12:12 2012 Martin Duerst <duerst@i...> + + * 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@r...> * bignum.c (rb_str_to_inum): must be ASCII compatible encoding as Index: transcode.c =================================================================== --- transcode.c (revision 35120) +++ transcode.c (revision 35121) @@ -2815,6 +2815,10 @@ * 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: * -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/