ruby-changes:9552
From: akr <ko1@a...>
Date: Sat, 27 Dec 2008 15:28:50 +0900 (JST)
Subject: [ruby-changes:9552] Ruby:r21092 (trunk): * transcode.c (make_econv_exception): show source and destination
akr 2008-12-27 15:28:34 +0900 (Sat, 27 Dec 2008) New Revision: 21092 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21092 Log: * transcode.c (make_econv_exception): show source and destination encoding. [ruby-dev:37285] Modified files: trunk/ChangeLog trunk/transcode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 21091) +++ ChangeLog (revision 21092) @@ -1,3 +1,8 @@ +Sat Dec 27 15:28:12 2008 Tanaka Akira <akr@f...> + + * transcode.c (make_econv_exception): show source and destination + encoding. [ruby-dev:37285] + Sat Dec 27 15:23:38 2008 Koichi Sasada <ko1@a...> * vm_insnhelper.c (vm_yield_with_cfunc): rename parameter name Index: transcode.c =================================================================== --- transcode.c (revision 21091) +++ transcode.c (revision 21092) @@ -2005,6 +2005,14 @@ StringValueCStr(dumped), ec->last_error.source_encoding, ec->last_error.destination_encoding); + if (strcmp(ec->last_error.source_encoding, + ec->source_encoding_name) != 0 || + strcmp(ec->last_error.destination_encoding, + ec->destination_encoding_name) != 0) { + rb_str_catf(mesg, " in conversion from %s to %s", + ec->source_encoding_name, + ec->destination_encoding_name); + } exc = rb_exc_new3(rb_eUndefinedConversionError, mesg); idx = rb_enc_find_index(ec->last_error.source_encoding); if (0 <= idx) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/