1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert r37098

This reverts
* encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.
because UTF-16 and UTF-32 is also treated as unicode in this context.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-10-06 03:04:55 +00:00
parent b1058ef46c
commit a9497d5a84

View file

@ -458,7 +458,8 @@ enc_ascii_compatible_p(VALUE enc)
int
rb_enc_unicode_p(rb_encoding *enc)
{
return ONIGENC_IS_UNICODE(enc);
const char *name = rb_enc_name(enc);
return name[0] == 'U' && name[1] == 'T' && name[2] == 'F' && name[4] != '7';
}
static st_data_t