ruby-changes:9582
From: yugui <ko1@a...>
Date: Sun, 28 Dec 2008 18:41:44 +0900 (JST)
Subject: [ruby-changes:9582] Ruby:r21122 (ruby_1_9_1): merges r21092 from trunk into ruby_1_9_1.
yugui 2008-12-28 18:41:23 +0900 (Sun, 28 Dec 2008) New Revision: 21122 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21122 Log: merges r21092 from trunk into ruby_1_9_1. * transcode.c (make_econv_exception): show source and destination encoding. [ruby-dev:37285] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/transcode.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21121) +++ ruby_1_9_1/ChangeLog (revision 21122) @@ -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: ruby_1_9_1/transcode.c =================================================================== --- ruby_1_9_1/transcode.c (revision 21121) +++ ruby_1_9_1/transcode.c (revision 21122) @@ -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/