diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 06:27:39 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 06:27:39 +0000 |
commit | ce2b982cd2c839fa736375e7906057785f4f3738 (patch) | |
tree | e38ce9dc8c3ced6336d596375822c62d093df6be /encoding.c | |
parent | cd2fd33edf4df972ea90b9e94a24866028247683 (diff) | |
download | ruby-ce2b982cd2c839fa736375e7906057785f4f3738.tar.gz |
* encoding.c (rb_enc_codelen): show codepoint in error message.
* include/ruby/encoding.h (rb_enc_codelen): comment it returns
positive integer.
* string.c (rb_str_concat): rb_enc_codelen doesn't return 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index 5c74871ecd..2e8b9b54ea 100644 --- a/encoding.c +++ b/encoding.c @@ -680,7 +680,7 @@ rb_enc_codelen(int c, rb_encoding *enc) { int n = ONIGENC_CODE_TO_MBCLEN(enc,c); if (n == 0) { - rb_raise(rb_eArgError, "invalid codepoint"); + rb_raise(rb_eArgError, "invalid codepoint 0x%x", c); } return n; } |