From ce2b982cd2c839fa736375e7906057785f4f3738 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 27 Dec 2007 06:27:39 +0000 Subject: * 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 --- string.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 7a88e79330..e780d1a992 100644 --- a/string.c +++ b/string.c @@ -1104,9 +1104,6 @@ rb_str_concat(VALUE str1, VALUE str2) int pos = RSTRING_LEN(str1); int len = rb_enc_codelen(c, enc); - if (len == 0) { - rb_raise(rb_eArgError, "invalid codepoint 0x%x", c); - } rb_str_resize(str1, pos+len); rb_enc_mbcput(c, RSTRING_PTR(str1)+pos, enc); return str1; -- cgit v1.2.3