* re.c (append_utf8): use rb_utf8_encoding() instead of

rb_enc_find("utf-8").


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-21 07:07:21 +00:00
parent e48ea0a5f3
commit e667720bd4
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Fri Dec 21 16:06:13 2007 Tanaka Akira <akr@fsij.org>
* re.c (append_utf8): use rb_utf8_encoding() instead of
rb_enc_find("utf-8").
Fri Dec 21 15:59:46 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* encoding.c (rb_enc_init): use enc_register_at() directly.

4
re.c
View File

@ -1708,8 +1708,8 @@ append_utf8(unsigned long uv,
rb_str_buf_cat(buf, utf8buf, len);
if (*encp == 0)
*encp = rb_enc_find("utf-8");
else if (*encp != rb_enc_find("utf-8")) {
*encp = rb_utf8_encoding();
else if (*encp != rb_utf8_encoding()) {
strcpy(err, "UTF-8 character in non UTF-8 regexp");
return -1;
}