diff options
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index ea00deb9e2..a8c04dcebf 100644 --- a/encoding.c +++ b/encoding.c @@ -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; } |