summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-27 06:27:39 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-27 06:27:39 +0000
commita9f1a3c3b84d05a1b0184c42f3191559202974a4 (patch)
treee38ce9dc8c3ced6336d596375822c62d093df6be /string.c
parent6c43158cfdc92bcbcb793dbe9144689b01413ec6 (diff)
downloadruby-a9f1a3c3b84d05a1b0184c42f3191559202974a4.tar.gz
ruby-a9f1a3c3b84d05a1b0184c42f3191559202974a4.tar.xz
ruby-a9f1a3c3b84d05a1b0184c42f3191559202974a4.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@14733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/string.c b/string.c
index 7a88e7933..e780d1a99 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;