summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-05 15:14:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-05 15:14:15 +0000
commitd5ac3f71aa662d77f987bd2700345118633c6ea5 (patch)
tree0d37a4a3dbc17a8150585dd01a81d2ec61e4374b /encoding.c
parent3376ea81f95fb295bc4172a3bafb50481a166263 (diff)
downloadbundler-d5ac3f71aa662d77f987bd2700345118633c6ea5.tar.gz
encoding.c: unicode_p
* encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/encoding.c b/encoding.c
index ae62d67486..6e9ef21d94 100644
--- a/encoding.c
+++ b/encoding.c
@@ -457,8 +457,7 @@ enc_ascii_compatible_p(VALUE enc)
int
rb_enc_unicode_p(rb_encoding *enc)
{
- const char *name = rb_enc_name(enc);
- return name[0] == 'U' && name[1] == 'T' && name[2] == 'F' && name[4] != '7';
+ return ONIGENC_IS_UNICODE(enc);
}
static st_data_t