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

* encoding.c (rb_enc_check): show encodings in error message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-27 06:12:19 +00:00
parent 6aef04f338
commit 8bb84c92d4
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Dec 27 15:11:27 2007 Tanaka Akira <akr@fsij.org>
* encoding.c (rb_enc_check): show encodings in error message.
Thu Dec 27 15:02:52 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_str_casecmp): fixed using a wrong variable.

View file

@ -504,7 +504,9 @@ rb_enc_check(VALUE str1, VALUE str2)
{
rb_encoding *enc = rb_enc_compatible(str1, str2);
if (!enc)
rb_raise(rb_eArgError, "character encodings differ");
rb_raise(rb_eArgError, "character encodings differ: %s and %s",
rb_enc_name(rb_enc_get(str1)),
rb_enc_name(rb_enc_get(str2)));
return enc;
}