1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* transcode.c (make_econv_exception): show source and destination

encoding.  [ruby-dev:37285]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-12-27 06:28:34 +00:00
parent 1f8620ca22
commit 415d59e3e4
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Sat Dec 27 15:28:12 2008 Tanaka Akira <akr@fsij.org>
* transcode.c (make_econv_exception): show source and destination
encoding. [ruby-dev:37285]
Sat Dec 27 15:23:38 2008 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_yield_with_cfunc): rename parameter name

View file

@ -2005,6 +2005,14 @@ make_econv_exception(rb_econv_t *ec)
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)